我在我的 $GOPATH 里跑不动了 go get git@github<user/repo>
一直报错:go: cannot use path@version syntax in GOPATH mode
即使在安装过程中配置好$GOPATH为什么 go get 也不起作用?
~/$ echo $GOPATH
/home/user/go
我在我的 $GOPATH 里跑不动了 go get git@github<user/repo>
一直报错:go: cannot use path@version syntax in GOPATH mode
即使在安装过程中配置好$GOPATH为什么 go get 也不起作用?
~/$ echo $GOPATH
/home/user/go
As you already noticed, you should use go get github.com/<user>/<repo>
.
The error message you saw comes from a new feature implemented in go get
to support Go modules - you can now also specify the version of a dependency: go get github.com/<user>/<repo>@<version>
, where version
is a git tag using semver, e.g. v1.0.2
.