cmd/go: respect default proxy setting, add direct fallback
Getenv("GOPROXY") says what the environment variable is (including looking in the go env file), but it doesn't include the default setting. This code needs to use cfg.GOPROXY to get the actual default. Fix and test that. Also, we forgot to include the fallback to direct for when the proxy serves a 404. Add and test that too. Also add HTTP fetch information to -x build flag output. (It does not belong in the -v output, despite the GOPATH go get command doing this.) Change-Id: Ieab7ef13cda3e1ad041dbe04921af206e2232c9c Reviewed-on: https://go-review.googlesource.com/c/go/+/178720 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Showing
Please register or sign in to comment