]> Cypherpunks repositories - gostls13.git/commit
cmd/go: add support for 'go' and 'toolchain' repos in modfetch
authorRuss Cox <rsc@golang.org>
Mon, 22 May 2023 15:39:22 +0000 (11:39 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 23 May 2023 16:36:19 +0000 (16:36 +0000)
commit876eca7924d5dc7355361ac4f4050a3ffcbc4cc7
tree62980f37aaa4f3f810d0a7903d83c54baf59ffe5
parentd9f7efed7df66494ad5137b108a37ee2e0853d52
cmd/go: add support for 'go' and 'toolchain' repos in modfetch

To make the new go lines work with 'go get' as minimum requirements,
this CL creates a synthetic 'go' module that has as its versions the valid
versions that can be listed on the 'go' line.

In preparation for allowing 'toolchain' changes as well, an equivalent
synthetic module is introduced for 'toolchain'.

For #57001.

Change-Id: Id0ebbd283f0f991859d516d21dffe59a834db540
Reviewed-on: https://go-review.googlesource.com/c/go/+/497080
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/go/internal/gover/mod.go
src/cmd/go/internal/gover/mod_test.go
src/cmd/go/internal/modfetch/cache.go
src/cmd/go/internal/modfetch/fetch.go
src/cmd/go/internal/modfetch/repo.go
src/cmd/go/internal/modfetch/toolchain.go [new file with mode: 0644]
src/cmd/go/internal/modload/modfile.go
src/cmd/go/internal/modload/query.go
src/cmd/go/testdata/script/gotoolchain_version.txt [new file with mode: 0644]