diff options
author | Russ Cox <rsc@golang.org> | 2023-01-14 16:40:22 -0500 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2023-01-17 23:10:39 +0000 |
commit | 7aa85e01376d840acc8bb931156d607a00b64a60 (patch) | |
tree | ad0f59de62a0783aa66b9659451596e3c6ed9feb /go.env | |
parent | 8a27154bcdb657fd172e77ba19ac0a5dccb996fb (diff) | |
download | go-7aa85e01376d840acc8bb931156d607a00b64a60.tar.gz go-7aa85e01376d840acc8bb931156d607a00b64a60.zip |
cmd/go: introduce GOROOT/go.env and move proxy/sumdb config there
Various Linux distributions edit cmd/go/internal/cfg/cfg.go to change
the default settings of GOPROXY and GOSUMDB. Make it possible for
them to do this without editing the go command source code by
introducing GOROOT/go.env and moving those defaults there.
With the upcoming changes for reproducible builds (#24904),
this should mean that Linux distributions distribute binaries
that are bit-for-bit identical to the Go distribution binaries,
even when rebuilding the distribution themselves.
Fixes #57179.
Change-Id: Ib2ecc61e6d036f97db6fd47dca757c94fdea5629
Reviewed-on: https://go-review.googlesource.com/c/go/+/462198
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Diffstat (limited to 'go.env')
-rw-r--r-- | go.env | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/go.env b/go.env new file mode 100644 index 0000000000..826192283f --- /dev/null +++ b/go.env @@ -0,0 +1,8 @@ +# This file contains the initial defaults for go command configuration. +# Values set by 'go env -w' and written to the user's go/env file override these. +# The environment overrides everything else. + +# Use the Go module mirror and checksum database by default. +# See https://proxy.golang.org for details. +GOPROXY=https://proxy.golang.org,direct +GOSUMDB=sum.golang.org |