]> Cypherpunks repositories - gostls13.git/commit
cmd/go: add loaderstate to Switcher
authorIan Alexander <jitsu@google.com>
Thu, 16 Oct 2025 21:43:58 +0000 (17:43 -0400)
committerIan Alexander <jitsu@google.com>
Mon, 20 Oct 2025 19:55:20 +0000 (12:55 -0700)
commit4dc3dd9a8615c88bef9247c9bab57e2b04bc662e
tree9bc5c20252f0ad24f45b21575403eb4d129b54dc
parentbcf7da1595da24e36f2750ee244523b5972233a1
cmd/go: add loaderstate to Switcher

Temporarily add modload.State field to the Switcher implementation.
Note that we cannot modify the gover.Switcher interface because doing
so creates an import cycle.

This commit is part of the overall effort to eliminate global
modloader state.

Change-Id: I20dba76328aa3d0df58caff75b174522bf9df9d5
Reviewed-on: https://go-review.googlesource.com/c/go/+/712703
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/modcmd/download.go
src/cmd/go/internal/modcmd/tidy.go
src/cmd/go/internal/modget/get.go
src/cmd/go/internal/toolchain/select.go
src/cmd/go/internal/toolchain/switch.go
src/cmd/go/internal/workcmd/use.go