mirror of
https://github.com/golang/go.git
synced 2025-11-10 13:41:05 +00:00
cmd/go: removed unused code in toolchain.Exec
This change removes the unused module loader state in the function `toolchain.Exec`. This commit is part of the overall effort to eliminate global modloader state. Change-Id: I8935f14447db4669457becc5a96db7f45132772f Reviewed-on: https://go-review.googlesource.com/c/go/+/709980 Reviewed-by: Michael Matloob <matloob@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
parent
180c07e2c1
commit
a6929cf4a7
1 changed files with 1 additions and 6 deletions
|
|
@ -285,6 +285,7 @@ func Select() {
|
|||
|
||||
counterSelectExec.Inc()
|
||||
Exec(moduleLoaderState, gotoolchain)
|
||||
panic("unreachable")
|
||||
}
|
||||
|
||||
var counterSelectExec = counter.New("go/toolchain/select-exec")
|
||||
|
|
@ -352,12 +353,6 @@ func Exec(s *modload.State, gotoolchain string) {
|
|||
base.Fatalf("cannot find %q in PATH", gotoolchain)
|
||||
}
|
||||
|
||||
// Set up modules without an explicit go.mod, to download distribution.
|
||||
s.Reset()
|
||||
s.ForceUseModules = true
|
||||
s.RootMode = modload.NoRoot
|
||||
modload.Init(s)
|
||||
|
||||
// Download and unpack toolchain module into module cache.
|
||||
// Note that multiple go commands might be doing this at the same time,
|
||||
// and that's OK: the module cache handles that case correctly.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue