-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 [email protected] (resolve to latest patch release, same as go get [email protected]). (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 golang#57001. Change-Id: I895ef3519ff95db8710ed23b36ebaf4f648120cb Reviewed-on: https://go-review.googlesource.com/c/go/+/500797 Reviewed-by: Michael Matloob <[email protected]> Run-TryBot: Russ Cox <[email protected]> TryBot-Bypass: Russ Cox <[email protected]>
- Loading branch information
Showing
16 changed files
with
359 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.