Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: go get path@version does not work #29659

Closed
jeanbza opened this issue Jan 10, 2019 · 2 comments
Closed

cmd/go: go get path@version does not work #29659

jeanbza opened this issue Jan 10, 2019 · 2 comments

Comments

@jeanbza
Copy link
Contributor

jeanbza commented Jan 10, 2019

What version of Go are you using (go version)?

$ go version
go version go1.11.4 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/deklerk/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/deklerk/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/lk/zs4m7sv12mq2vzk_wfn2tfvm00h16k/T/go-build633732581=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

cd /tmp/whatever && unset GOPATH && go get cloud.google.com/[email protected]

What did you expect to see?

Get cloud.google.com/[email protected]

What did you see instead?

$ cd /tmp/whatever && unset GOPATH && go get cloud.google.com/[email protected]
go: cannot use path@version syntax in GOPATH mode
@bcmills
Copy link
Contributor

bcmills commented Jan 10, 2019

Dup of #24250: should work in go1.12beta1 if you set GO111MODULE=on.

(If you unset GOPATH, it defaults to '$HOME/go`.)

@bcmills bcmills closed this as completed Jan 10, 2019
@bcmills bcmills added the GoCommand cmd/go label Jan 10, 2019
@jeanbza
Copy link
Contributor Author

jeanbza commented Jan 10, 2019

Thanks!

@golang golang locked and limited conversation to collaborators Jan 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants