From e12efecfa7bd47e2cd8b98c9519bba63c81b8c6f Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 24 May 2019 17:42:41 -0400 Subject: [PATCH] cmd/go: update docs for GOPROXY default The default is now "https://proxy.golang.org,direct" not just "https://proxy.golang.org" (as of CL 178720). Change-Id: I47e67602e994332b988ed1b75fa57319f3876cc6 Reviewed-on: https://go-review.googlesource.com/c/go/+/178725 Run-TryBot: Russ Cox TryBot-Result: Gobot Gobot Reviewed-by: Bryan C. Mills --- src/cmd/go/alldocs.go | 4 +++- src/cmd/go/internal/modload/help.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index 26fb337f86a3ca..94a9dcb983025d 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -2579,7 +2579,9 @@ // The go command can fetch modules from a proxy or connect to source control // servers directly, according to the setting of the GOPROXY environment // variable (see 'go help env'). The default setting for GOPROXY is -// "https://proxy.golang.org", the Go module mirror run by Google. +// "https://proxy.golang.org,direct", which means to try the +// Go module mirror run by Google and fall back to a direct connection +// if the proxy reports that it does not have the module (HTTP error 404 or 410). // See https://proxy.golang.org/privacy for the service's privacy policy. // If GOPROXY is set to the string "direct", downloads use a direct connection // to source control servers. Setting GOPROXY to "off" disallows downloading diff --git a/src/cmd/go/internal/modload/help.go b/src/cmd/go/internal/modload/help.go index 96fec8451edcee..cb996d3546e317 100644 --- a/src/cmd/go/internal/modload/help.go +++ b/src/cmd/go/internal/modload/help.go @@ -331,7 +331,9 @@ Module downloading and verification The go command can fetch modules from a proxy or connect to source control servers directly, according to the setting of the GOPROXY environment variable (see 'go help env'). The default setting for GOPROXY is -"https://proxy.golang.org", the Go module mirror run by Google. +"https://proxy.golang.org,direct", which means to try the +Go module mirror run by Google and fall back to a direct connection +if the proxy reports that it does not have the module (HTTP error 404 or 410). See https://proxy.golang.org/privacy for the service's privacy policy. If GOPROXY is set to the string "direct", downloads use a direct connection to source control servers. Setting GOPROXY to "off" disallows downloading