]> Cypherpunks repositories - gostls13.git/commit
cmd/go: make ImportMissingError work with local state
authorIan Alexander <jitsu@google.com>
Fri, 3 Oct 2025 04:50:03 +0000 (00:50 -0400)
committerIan Alexander <jitsu@google.com>
Sat, 25 Oct 2025 01:07:40 +0000 (18:07 -0700)
commitccf4192a313ec46380c70369537085eacaa17fa8
treeb1aeed8691f29d873eaacd4b30e4c43fdfceb947
parentf5403f15f021521ed82d91e8f28a6865d9aeab34
cmd/go: make ImportMissingError work with local state

This change adds fields to the type `ImportMissingError` so
that the `Error()` method can be called without accessing the global
`LoaderState` variable.

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

Change-Id: Ib313faeb27ae44e9ac68086313633ce742f596dd
Reviewed-on: https://go-review.googlesource.com/c/go/+/711121
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
src/cmd/go/internal/modload/import.go
src/cmd/go/internal/modload/load.go