diff options
author | Russ Cox <rsc@golang.org> | 2019-05-24 08:55:30 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2019-05-24 21:34:53 +0000 |
commit | 385b2e0caccbb5da73b940a756c043a0aaa2d5a8 (patch) | |
tree | 0000280e256ae6384f0064496417de08d97160f2 /src/cmd/go/internal/cfg/cfg.go | |
parent | c7385e270473244ef5aa312a172f1912e99800be (diff) | |
download | go-385b2e0caccbb5da73b940a756c043a0aaa2d5a8.tar.gz go-385b2e0caccbb5da73b940a756c043a0aaa2d5a8.zip |
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>
Diffstat (limited to 'src/cmd/go/internal/cfg/cfg.go')
-rw-r--r-- | src/cmd/go/internal/cfg/cfg.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go index 77d8bab14f..c3c9c978a5 100644 --- a/src/cmd/go/internal/cfg/cfg.go +++ b/src/cmd/go/internal/cfg/cfg.go @@ -303,7 +303,7 @@ func goproxy() string { return v } - return "https://proxy.golang.org" + return "https://proxy.golang.org,direct" } func gosumdb() string { |