]> Cypherpunks repositories - gostls13.git/commit
cmd/go: inject State parameter into `modcmd.runVerify`
authorIan Alexander <jitsu@google.com>
Thu, 2 Oct 2025 03:21:21 +0000 (23:21 -0400)
committerIan Alexander <jitsu@google.com>
Mon, 20 Oct 2025 19:59:28 +0000 (12:59 -0700)
commitf859799ccf537bc5f506698ae2d1ce028b81c78c
tree57d7238260d3704d743671555be0c53be963bb5c
parent0f820aca291dfd091c87c045147715cc1bf7266b
cmd/go: inject State parameter into `modcmd.runVerify`

This command modifies the call tree starting at `modcmd.runVerify` to
inject a `State` parameter to every function that is currently using
the global `modload.LoaderState` variable.  By explicilty passing a
`State` parameter, we can begin to eliminate the usage of the global
`modload.LoaderState`.

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

[git-generate]
cd src/cmd/go/internal/modcmd
rf 'inject modload.LoaderState runVerify'
cd ..
./rf-cleanup.zsh

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