From 27eaffc053d77e967c8bcd71b47087f468accb46 Mon Sep 17 00:00:00 2001 From: Tyler Bui-Palsulich Date: Tue, 28 May 2019 15:50:01 -0400 Subject: [PATCH] cmd/go: document GO{NO}SUMDB in 'go help environment' and 'go help modules' GOSUMDB and GONOSUMDB are described in detail by 'go help module-auth'. So, this change mentions the two variables and says to see 'go help module-auth'. This also adds GONOPROXY to 'go help environment'. Fixes #32292 and updates #32056. Change-Id: I2eae0f906a3fbfcb88ad5c8fb4870917d0d7bbcd Reviewed-on: https://go-review.googlesource.com/c/go/+/179219 Reviewed-by: Russ Cox --- src/cmd/go/alldocs.go | 18 +++++++++++++++--- src/cmd/go/internal/help/helpdoc.go | 13 ++++++++++++- src/cmd/go/internal/modload/help.go | 5 +++-- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index 63470694cd..43f62e822d 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -1567,7 +1567,18 @@ // GOPATH // For more details see: 'go help gopath'. // GOPROXY -// URL of Go module proxy. See 'go help goproxy'. +// URL of Go module proxy. See 'go help modules'. +// GONOPROXY +// Comma-separated list of glob patterns (in the syntax of Go's path.Match) +// of module path prefixes that should always be fetched directly, ignoring +// the GOPROXY setting. See 'go help modules'. +// GOSUMDB +// The name of checksum database to use and optionally its public key and +// URL. See 'go help module-auth'. +// GONOSUMDB +// Comma-separated list of glob patterns (in the syntax of Go's path.Match) +// of module path prefixes that should not be compared against the checksum +// database. See 'go help module-auth'. // GOROOT // The root of the go tree. // GOTMPDIR @@ -2604,8 +2615,9 @@ // No matter the source of the modules, the go command checks downloads against // known checksums, to detect unexpected changes in the content of any specific // module version from one day to the next. This check first consults the current -// module's go.sum file but falls back to the Go checksum database. -// See 'go help module-auth' for details. +// module's go.sum file but falls back to the Go checksum database, controlled by +// the GOSUMDB and GONOSUMDB environment variables. See 'go help module-auth' +// for details. // // See 'go help goproxy' for details about the proxy protocol and also // the format of the cached downloaded packages. diff --git a/src/cmd/go/internal/help/helpdoc.go b/src/cmd/go/internal/help/helpdoc.go index 43ad57f2c0..2cdd76c6cd 100644 --- a/src/cmd/go/internal/help/helpdoc.go +++ b/src/cmd/go/internal/help/helpdoc.go @@ -509,7 +509,18 @@ General-purpose environment variables: GOPATH For more details see: 'go help gopath'. GOPROXY - URL of Go module proxy. See 'go help goproxy'. + URL of Go module proxy. See 'go help modules'. + GONOPROXY + Comma-separated list of glob patterns (in the syntax of Go's path.Match) + of module path prefixes that should always be fetched directly, ignoring + the GOPROXY setting. See 'go help modules'. + GOSUMDB + The name of checksum database to use and optionally its public key and + URL. See 'go help module-auth'. + GONOSUMDB + Comma-separated list of glob patterns (in the syntax of Go's path.Match) + of module path prefixes that should not be compared against the checksum + database. See 'go help module-auth'. GOROOT The root of the go tree. GOTMPDIR diff --git a/src/cmd/go/internal/modload/help.go b/src/cmd/go/internal/modload/help.go index 74ee985590..5630524ca2 100644 --- a/src/cmd/go/internal/modload/help.go +++ b/src/cmd/go/internal/modload/help.go @@ -365,8 +365,9 @@ for future go command invocations. No matter the source of the modules, the go command checks downloads against known checksums, to detect unexpected changes in the content of any specific module version from one day to the next. This check first consults the current -module's go.sum file but falls back to the Go checksum database. -See 'go help module-auth' for details. +module's go.sum file but falls back to the Go checksum database, controlled by +the GOSUMDB and GONOSUMDB environment variables. See 'go help module-auth' +for details. See 'go help goproxy' for details about the proxy protocol and also the format of the cached downloaded packages. -- 2.50.0