]> Cypherpunks repositories - gostls13.git/commit
cmd/go: add loaderstate as field on `QueryMatchesMainModulesError`
authorIan Alexander <jitsu@google.com>
Thu, 2 Oct 2025 20:56:19 +0000 (16:56 -0400)
committerIan Alexander <jitsu@google.com>
Fri, 24 Oct 2025 14:23:31 +0000 (07:23 -0700)
commitc445a61e5256914510f201d5bda5e526249217d6
treee94226ca2e2051a4c3b52dfd9e33b1b36218fb60
parent6ac40051d3eee124e8c2d2ad93c518034944a1d4
cmd/go: add loaderstate as field on `QueryMatchesMainModulesError`

This change modifies the type `QueryMatchesMainModulesError` to have
an additional field to store the current module loader state.  The
field is used to break the dependency on the global
`modload.LoaderState` variable.

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

Change-Id: Ia2066fab9f3ec4ffdd3d7393dacdf65c0fd35b92
Reviewed-on: https://go-review.googlesource.com/c/go/+/711118
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/internal/modget/get.go
src/cmd/go/internal/modload/query.go