]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go/internal/load: remove references to modfetch.Fetcher_
authorIan Alexander <jitsu@google.com>
Mon, 24 Nov 2025 23:38:13 +0000 (18:38 -0500)
committerIan Alexander <jitsu@google.com>
Wed, 26 Nov 2025 17:31:15 +0000 (09:31 -0800)
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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@google.com>
src/cmd/go/internal/load/pkg.go

index 705f4aa6a9807152154b8401d63b8101b46a6a11..91602aa5bff705e7d6e3e878a55e0d129bd4ba5e 100644 (file)
@@ -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)
        }