From: Ian Alexander Date: Mon, 24 Nov 2025 23:38:13 +0000 (-0500) Subject: cmd/go/internal/load: remove references to modfetch.Fetcher_ X-Git-Tag: go1.26rc1~94 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a3a6c9f62a;p=gostls13.git cmd/go/internal/load: remove references to modfetch.Fetcher_ This commit removes references to the global modfetch.Fetcher_ variable from the load package. Change-Id: Ic579743079252afd4d2d12e5118de09d86340267 Reviewed-on: https://go-review.googlesource.com/c/go/+/724246 LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Matloob Reviewed-by: Michael Matloob --- diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go index 705f4aa6a9..91602aa5bf 100644 --- a/src/cmd/go/internal/load/pkg.go +++ b/src/cmd/go/internal/load/pkg.go @@ -7,7 +7,6 @@ package load import ( "bytes" - "cmd/internal/objabi" "context" "encoding/json" "errors" @@ -31,6 +30,8 @@ import ( "unicode" "unicode/utf8" + "cmd/internal/objabi" + "cmd/go/internal/base" "cmd/go/internal/cfg" "cmd/go/internal/fips140" @@ -3416,7 +3417,7 @@ func PackagesAndErrorsOutsideModule(loaderstate *modload.State, ctx context.Cont if deprecation != "" { fmt.Fprintf(os.Stderr, "go: module %s is deprecated: %s\n", rootMod.Path, modload.ShortMessage(deprecation, "")) } - data, err := modfetch.Fetcher_.GoMod(ctx, rootMod.Path, rootMod.Version) + data, err := loaderstate.Fetcher().GoMod(ctx, rootMod.Path, rootMod.Version) if err != nil { return nil, fmt.Errorf("%s: %w", args[0], err) }