]> Cypherpunks repositories - gostls13.git/commit
cmd/go: export type State
authorIan Alexander <jitsu@google.com>
Wed, 20 Aug 2025 23:12:20 +0000 (19:12 -0400)
committerIan Alexander <jitsu@google.com>
Mon, 6 Oct 2025 19:52:05 +0000 (12:52 -0700)
commit24416458c21a48d83f34d3c2242d892e002bcd6c
tree693499ba23030b485b3a49b54b7b5eb40cf6a9b2
parentc2fb15164bdb9d44a302771be613fbef5faa4a8e
cmd/go: export type State

Export the type `State` and add global variable `LoaderState` in
preparation for refactoring usage of other global variables in the
modload package.

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

[git-generate]
cd src/cmd/go/internal/modload
rf 'mv state State'
rf 'add State func NewState() *State { return &State{} }'
rf 'add init.go:/NewState/+0 var LoaderState = NewState()'

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