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

No longer go gettable with go 1.11 and GO111MODULE=on inside $GOPATH #93

Open
zshift opened this issue Oct 21, 2018 · 2 comments · May be fixed by #96
Open

No longer go gettable with go 1.11 and GO111MODULE=on inside $GOPATH #93

zshift opened this issue Oct 21, 2018 · 2 comments · May be fixed by #96

Comments

@zshift
Copy link

zshift commented Oct 21, 2018

Repro steps

> echo $GO111MODULE
on
> pwd
(subdir of GOPATH)
> go get -u github.com/davecgh/go-spew/spew
go: finding github.com/davecgh/go-spew/spew latest
go get github.com/davecgh/go-spew/spew: no matching versions for query "latest"
@dmitshur
Copy link

dmitshur commented Oct 21, 2018

I don't think you can use GO111MODULE=on inside a GOPATH workspace, can you? I think
GO111MODULE=on is allowed only outside of GOPATH, and GO111MODULE=off or GO111MODULE=auto are allowed inside.

Edit: Never mind, it seems valid to use GO111MODULE=on inside a GOPATH workspace according to https://github.com/golang/go/wiki/Modules#how-to-define-a-module.

@zshift zshift linked a pull request Dec 1, 2018 that will close this issue
@dchapes
Copy link

dchapes commented May 28, 2020

Works for me:

> pwd
[subdir of $GOPATH]
> go version
go version go1.14.3 freebsd/amd64
> go env GOMOD
[no output, e.g. no go.mod found]
> env GO111MODULE=on go env GOMOD
/dev/null
> env GO111MODULE=on go get -u github.com/davecgh/go-spew/spew
go: found github.com/davecgh/go-spew/spew in github.com/davecgh/go-spew v1.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants