Installing packages in a local directory

后端 未结 4 1170
野的像风
野的像风 2021-02-01 21:59

What is the best practice to install packages (those with go get...) in a local directory?

Example: I\'d like to try out the Revel web framework, but I don\

4条回答
  •  日久生厌
    2021-02-01 22:22

    You might want to consider using Go Version Manager (gvm).

    Apart from switching between Go versions easily, it also lets you switch between pkgsets ("workspaces").

    First you create a set

    gvm pkgset create myproject
    

    and then you use it

    gvm pkgset use myproject
    

    Works like a charm.

提交回复
热议问题