aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/modload/load.go
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2022-11-21 15:32:52 -0500
committerGopher Robot <gobot@golang.org>2023-05-18 19:33:59 +0000
commitebfd80ba6f231f80484d5fedca5b60e1f166644e (patch)
tree1840be88c7c33381be57539fc373aad0669b20e8 /src/cmd/go/internal/modload/load.go
parent72f448cb48069ddeb0c30e726fc3b9d113aaf51e (diff)
downloadgo-ebfd80ba6f231f80484d5fedca5b60e1f166644e.tar.gz
go-ebfd80ba6f231f80484d5fedca5b60e1f166644e.zip
cmd/go: propagate Context arguments through modfetch methods
For #56886. For #38714. Change-Id: I15c4a8673407d3423d7e203d645c6d0fb780d192 Reviewed-on: https://go-review.googlesource.com/c/go/+/452456 Reviewed-by: Michael Matloob <matloob@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/go/internal/modload/load.go')
-rw-r--r--src/cmd/go/internal/modload/load.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/go/internal/modload/load.go b/src/cmd/go/internal/modload/load.go
index 1251b56c866..550f837da08 100644
--- a/src/cmd/go/internal/modload/load.go
+++ b/src/cmd/go/internal/modload/load.go
@@ -415,7 +415,7 @@ func LoadPackages(ctx context.Context, opts PackageOpts, patterns ...string) (ma
// loaded.requirements, but here we may have also loaded (and want to
// preserve checksums for) additional entities from compatRS, which are
// only needed for compatibility with ld.TidyCompatibleVersion.
- if err := modfetch.WriteGoSum(keep, mustHaveCompleteRequirements()); err != nil {
+ if err := modfetch.WriteGoSum(ctx, keep, mustHaveCompleteRequirements()); err != nil {
base.Fatalf("go: %v", err)
}
}
@@ -636,9 +636,9 @@ func pathInModuleCache(ctx context.Context, dir string, rs *Requirements) string
root = filepath.Join(replaceRelativeTo(), root)
}
} else if repl.Path != "" {
- root, err = modfetch.DownloadDir(repl)
+ root, err = modfetch.DownloadDir(ctx, repl)
} else {
- root, err = modfetch.DownloadDir(m)
+ root, err = modfetch.DownloadDir(ctx, m)
}
if err != nil {
return "", false