Go modules, private repos and gopath

前端 未结 3 1274
谎友^
谎友^ 2020-12-16 13:17

We are converting our internal codebase from the dep dependency manager to go modules (vgo or built in with go1.11.2). Imagine we have code like th

3条回答
  •  一生所求
    2020-12-16 13:47

    I use ls-remote git command to help resolve private repo tags and go get after it.

    $ go env GO111MODULE=on
    $ go env GOPRIVATE=yourprivaterepo.com
    $ git ls-remote -q https://yourprivaterepo.com/yourproject.git
    $ go get
    

提交回复
热议问题