diff options
| author | Michael Matloob <matloob@golang.org> | 2026-03-24 12:22:25 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2026-03-25 08:25:28 -0700 |
| commit | 068f27a8e06e58361bcc2d5e7d17deafab4b52bc (patch) | |
| tree | 0e5d2455bd922e346a2ef2c5d5dfa696ba632610 /src | |
| parent | 98aaa9b0ee54ba197432458a6f344c14aa12c106 (diff) | |
| download | go-068f27a8e06e58361bcc2d5e7d17deafab4b52bc.tar.xz | |
cmd/go: add information about GODEBUGs to go help gopath
And make it clear that standard library tests won't run properly with
GO111MODULE=off.
Fixes #73973
Fixes #69202
Change-Id: I8c71c739e1da80fbf2e13f84ecaf9c346a6a6964
Reviewed-on: https://go-review.googlesource.com/c/go/+/758720
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Matloob <matloob@google.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/go/alldocs.go | 7 | ||||
| -rw-r--r-- | src/cmd/go/internal/help/helpdoc.go | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index b26c8aeaf1..52aa6c7fb4 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -2877,6 +2877,13 @@ // Code in GOPATH mode vendor directories is not subject to // GOPATH mode import path checking (see 'go help importpath'). // +// In GOPATH mode, the default GODEBUG values built into a binary +// will be those used in Go 1.20, setting the same GODEBUG values +// as when a module specifies "godebug default=go1.20". To use +// different GODEBUG settings, the GODEBUG environment variable must +// be set to override those values. This also means that the standard +// library tests will not run properly with GO111MODULE=off. +// // See https://go.dev/s/go15vendor for details. // // See https://go.dev/ref/mod#vendoring for details about vendoring in diff --git a/src/cmd/go/internal/help/helpdoc.go b/src/cmd/go/internal/help/helpdoc.go index ba3cfc25de..5f77b88536 100644 --- a/src/cmd/go/internal/help/helpdoc.go +++ b/src/cmd/go/internal/help/helpdoc.go @@ -524,6 +524,13 @@ top-level "crash/bang". Code in GOPATH mode vendor directories is not subject to GOPATH mode import path checking (see 'go help importpath'). +In GOPATH mode, the default GODEBUG values built into a binary +will be those used in Go 1.20, setting the same GODEBUG values +as when a module specifies "godebug default=go1.20". To use +different GODEBUG settings, the GODEBUG environment variable must +be set to override those values. This also means that the standard +library tests will not run properly with GO111MODULE=off. + See https://go.dev/s/go15vendor for details. See https://go.dev/ref/mod#vendoring for details about vendoring in |
