]> Cypherpunks repositories - gostls13.git/commit
cmd/go: implement 'toolchain local'
authorRuss Cox <rsc@golang.org>
Tue, 23 May 2023 18:23:31 +0000 (14:23 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 24 May 2023 19:27:00 +0000 (19:27 +0000)
commit83dfe5cf62234427eae04131dc6e4551fd283463
tree00c126a09655f4743361d603f76309048986f7fd
parenta4772a1a5974bbf5a5bc8ba84351062ae2d4cacd
cmd/go: implement 'toolchain local'

The actual selection code already worked
(except for the x/mod parser not reading the file),
so all that is necessary is a test.
For the test, move the version check up before
the module line presence check.

For #57001.

Change-Id: Iaa4f9b92d38fcfd99dc1665ec8d3eb0e52007bb4
Reviewed-on: https://go-review.googlesource.com/c/go/+/497555
TryBot-Bypass: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/cmd/go/gotoolchain.go
src/cmd/go/internal/gover/toolchain.go [new file with mode: 0644]
src/cmd/go/internal/modload/init.go
src/cmd/go/internal/modload/modfile.go
src/cmd/go/internal/version/version.go
src/cmd/go/testdata/script/gotoolchain.txt