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
{{ message }}
Repository navigation
cmd/go: go test std should give a clearer error with GO111MODULE=off #81364
Prior to filing this issue, I forgot that it was already decided and documented that testing the Go standard library with GO111MODULE=auto or GO111MODULE=off is not supported (see go help gopath and issue #69202). Consider what happens if someone attempts to do it anyway:
$ go test net/http
$ GO111MODULE=off go test net/http
What did you see happen?
$ go test net/http
ok net/http 13.379s
$ GO111MODULE=off go test net/http
< 3186407 bytes of output, which are unhelpful as testing standard library packages
with GO111MODULE111=off is unsupported and known to produce false positive signal >
What did you expect to see?
$ go test net/http
ok net/http 13.379s
$ GO111MODULE=off go test net/http
go: modules disabled by GO111MODULE=off; see 'go help gopath'
Or some better phrasing - see related issue #66080 about go get error clarity.
Implementing this might be tricky since it'd have to be done without also breaking the ability for cmd/go tests themselves to test this mode (given proposal #60915), but if it can be done somehow it may reduce possibility of confusion in the future.
Activity
gabyhelp commentedon Sep 4, 2026
Related Issues
Related Code Changes
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)