cmd/go/internal/modget: remove references to modfetch.Fetcher_

This commit removes references to the global modfetch.Fetcher_
variable from the modget package.

Change-Id: I62dfcc0e9cf9722a6706bbdf7b6e561130ed82d1
Reviewed-on: https://go-review.googlesource.com/c/go/+/724247
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
This commit is contained in:
Ian Alexander 2025-11-24 18:39:53 -05:00
parent a3a6c9f62a
commit 46d5e3ea0e

View file

@ -1788,11 +1788,11 @@ func (r *resolver) checkPackageProblems(loaderstate *modload.State, ctx context.
if oldRepl := modload.Replacement(loaderstate, old); oldRepl.Path != "" {
oldActual = oldRepl
}
if mActual == oldActual || mActual.Version == "" || !modfetch.HaveSum(modfetch.Fetcher_, oldActual) {
if mActual == oldActual || mActual.Version == "" || !modfetch.HaveSum(loaderstate.Fetcher(), oldActual) {
continue
}
r.work.Add(func() {
if _, err := modfetch.Fetcher_.DownloadZip(ctx, mActual); err != nil {
if _, err := loaderstate.Fetcher().DownloadZip(ctx, mActual); err != nil {
verb := "upgraded"
if gover.ModCompare(m.Path, m.Version, old.Version) < 0 {
verb = "downgraded"