// 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)
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)