aboutsummaryrefslogtreecommitdiff
path: root/go.env
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2023-06-04 22:34:52 -0400
committerRuss Cox <rsc@golang.org>2023-06-06 19:18:46 +0000
commit35268a996052ca8716caf94467c2ed61140f3862 (patch)
tree4e9b43b9f749a5ead6d098bb825a32c7d4e57219 /go.env
parentbf016520e2575f8eb5e37634a4ed18c8c8044859 (diff)
downloadgo-35268a996052ca8716caf94467c2ed61140f3862.tar.gz
go-35268a996052ca8716caf94467c2ed61140f3862.zip
cmd/go: additional doc-inspired tests and bug fixes
Additional tests and bug fixes realized while writing go.dev/doc/gotoolchain (CL 500775). - Handle go get toolchain@go1.22 (resolve to latest patch release, same as go get go@1.22). (See modload/query.go and gover/mod.go.) - Handle go get go@patch toolchain@patch. (See modload/query.go and gover/mod.go.) - Remove prefix-goVERSION-suffix form for toolchain name, standardizing on goVERSION-suffix. I have no good explanation for having two forms, so simplify to one. (See vendor and gover.) - Fail toolchain downloads when GOSUMDB=off. Because toolchain downloads cannot always be predicted (especially during switching rather than selection), they cannot be listed in go.sum. We rely on the checksum database for integrity of the download, especially if proxied. If the checksum database is disabled, this integrity check won't happen, so fail toolchain downloads. (See modfetch/sumdb.go and script/gotoolchain_net.txt) - Use names from documentation in package toolchain (Select, Switch; SwitchTo renamed to Exec to avoid both names; reqs.go renamed to switch.go; toolchain.go renamed to select.go.) - Make "go env GOTOOLCHAIN" and "go env -w GOTOOLCHAIN" work even when GOTOOLCHAIN is misconfigured. (See special case at top of Select in select.go.) - Clarify what goInstallVersion does (report whether this is go install or go run pkg@version) and explain the potential version switch more clearly. Use the Switcher directly instead of reimplementing it. (See select.go.) - Document go@ and toolchain@ forms in go help get, linking to go.dev/doc/toolchain. (See modget/get.go.) - Update URL of documentation in $GOROOT/go.env. For #57001. Change-Id: I895ef3519ff95db8710ed23b36ebaf4f648120cb Reviewed-on: https://go-review.googlesource.com/c/go/+/500797 Reviewed-by: Michael Matloob <matloob@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Bypass: Russ Cox <rsc@golang.org>
Diffstat (limited to 'go.env')
-rw-r--r--go.env2
1 files changed, 1 insertions, 1 deletions
diff --git a/go.env b/go.env
index 9bab8ffd73..6ff2b921d4 100644
--- a/go.env
+++ b/go.env
@@ -8,5 +8,5 @@ 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.
+# See https://go.dev/doc/toolchain for details.
GOTOOLCHAIN=auto