mirror of
https://github.com/golang/go
synced 2024-11-16 22:24:47 -07:00
a6a25869f0
As part of the work for #57179 we moved configurable defaults to GOROOT/go.env, so that packagers don't have to modify source code to change those defaults. Since packagers may want to modify GOTOOLCHAIN's default, move it to go.env too. This CL modifies 'go env' to print GOTOOLCHAIN by default. It also refines CL 496957 from yesterday to recognize any env var in either go.env or the user go/env, not just the user go/env. When I put GOTOOLCHAIN in go.env, but before I added it to the default printing list, 'go env GOTOOLCHAIN' was printing an empty string, and it was incredibly confusing. For #57001. Fixes #60361 while we're here. Also includes a fix for a review comment on CL 497079 that I forgot to mail. Change-Id: I7b904d9202f05af789aaa33aed93f903b515aa28 Reviewed-on: https://go-review.googlesource.com/c/go/+/497437 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Russ Cox <rsc@golang.org>
13 lines
505 B
Bash
13 lines
505 B
Bash
# 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
|
|
|
|
# Automatically download newer toolchains as directed by go.mod files.
|
|
# See https://go.dev/s/gotoolchain for details.
|
|
GOTOOLCHAIN=auto
|