diff options
| author | Ian Alexander <jitsu@google.com> | 2025-08-20 20:14:59 -0400 |
|---|---|---|
| committer | Ian Alexander <jitsu@google.com> | 2025-10-07 14:08:14 -0700 |
| commit | 162392773085d4cc12072200853a0424117983c0 (patch) | |
| tree | 58ce48feb897eb9956885521446fd44bbf0d7cc6 /src/testing | |
| parent | a1661e776f57602b4d4470389a0246f9784fd722 (diff) | |
| download | go-162392773085d4cc12072200853a0424117983c0.tar.xz | |
cmd/go: refactor usage of `requirements`
This commit refactors usage of the global variable `requirements` to
the global LoaderState field of the same name.
This commit is part of the overall effort to eliminate global
modloader state.
[git-generate]
cd src/cmd/go/internal/modload
rf 'ex { requirements -> LoaderState.requirements }'
rf 'add State.MainModules \
// requirements is the requirement graph for the main module.\
//\
// It is always non-nil if the main module'\\\''s go.mod file has been\
// loaded.\
//\
// This variable should only be read from the loadModFile\
// function, and should only be written in the loadModFile and\
// commitRequirements functions. All other functions that need or\
// produce a *Requirements should accept and/or return an explicit\
// parameter.'
rf 'rm requirements'
Change-Id: I9d7d1d301a9e89f9214ce632fa5b656dd2940f39
Reviewed-on: https://go-review.googlesource.com/c/go/+/698061
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>
Diffstat (limited to 'src/testing')
0 files changed, 0 insertions, 0 deletions
