You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since you don't have GO111MODULE set, it defaults to auto, and the go command will look for a go.mod file in parent directories to decide whether to build in module mode or GOPATH mode.
With auto, the file $GOPATH/go.mod must not exist. Based in your GOPATH, it may be either /home/lbbxsxlz/gitWorkspace/gzCoredump/src/go.mod or /home/lbbxsxlz/workspace/GO/src/go.mod. You can either remove it or set GO111MODULE=off in your environment to build in GOPATH mode.
It sounds like this is working as intended, so I'll close this issue. The golang-nuts mailing list and the Gophers Slack are the best places to ask questions.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go test elfreader
$GOPATH/go.mod exists but should not
What did you expect to see?
I want to know whether command "go mod init" is conflicted with "go test".
the cmd "go test" is depended on GOPATH.
What did you see instead?
The text was updated successfully, but these errors were encountered: