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>
import (
"bytes"
- "cmd/internal/objabi"
"context"
"encoding/json"
"errors"
"unicode"
"unicode/utf8"
+ "cmd/internal/objabi"
+
"cmd/go/internal/base"
"cmd/go/internal/cfg"
"cmd/go/internal/fips140"
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)
}