From 03f499ec4602500939a1ed3c540cbd5183c20ce9 Mon Sep 17 00:00:00 2001 From: Ian Alexander Date: Mon, 24 Nov 2025 18:30:50 -0500 Subject: [PATCH] cmd/go/internal/modfetch: remove references to Fetcher_ in test file This commit removes references to the global Fetcher_ variable from the zip sum test file. Change-Id: I622587f7809f4c6bcd4afbb35312912149b7a3ea Reviewed-on: https://go-review.googlesource.com/c/go/+/724244 Reviewed-by: Michael Matloob LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Matloob --- src/cmd/go/internal/modfetch/zip_sum_test/zip_sum_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmd/go/internal/modfetch/zip_sum_test/zip_sum_test.go b/src/cmd/go/internal/modfetch/zip_sum_test/zip_sum_test.go index 6d11dbc5bf..6b2312cbed 100644 --- a/src/cmd/go/internal/modfetch/zip_sum_test/zip_sum_test.go +++ b/src/cmd/go/internal/modfetch/zip_sum_test/zip_sum_test.go @@ -112,6 +112,7 @@ func TestZipSums(t *testing.T) { // Download modules with a rate limit. We may run out of file descriptors // or cause timeouts without a limit. needUpdate := false + fetcher := modfetch.NewFetcher() for i := range tests { test := &tests[i] name := fmt.Sprintf("%s@%s", strings.ReplaceAll(test.m.Path, "/", "_"), test.m.Version) @@ -119,7 +120,7 @@ func TestZipSums(t *testing.T) { t.Parallel() ctx := context.Background() - zipPath, err := modfetch.Fetcher_.DownloadZip(ctx, test.m) + zipPath, err := fetcher.DownloadZip(ctx, test.m) if err != nil { if *updateTestData { t.Logf("%s: could not download module: %s (will remove from testdata)", test.m, err) -- 2.52.0