]> Cypherpunks repositories - gostls13.git/commit
cmd/go: add go mod download
authorRuss Cox <rsc@golang.org>
Tue, 7 Aug 2018 16:01:36 +0000 (12:01 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 10 Aug 2018 00:01:34 +0000 (00:01 +0000)
commit9f4ea6c25d7cee2ddb7d478cf03582baad17cc59
treebbcaca8961a171dec125a3a9edd6ce639ed250b9
parent89e13c80efe19caa7deb8e4a5b0ccfa385a8b0bf
cmd/go: add go mod download

go mod download provides a way to force downloading
of a particular module version into the download cache
and also to locate its cached files.

Forcing downloads is useful for warming caches, such as
in base docker images.

Finding the cached files allows caching proxies to use
go mod download as the way to obtain module files
on cache miss.

Fixes #26577.
Fixes #26610.

Change-Id: Ib8065bcce07c9f5105868ec1d87887ef4871f07e
Reviewed-on: https://go-review.googlesource.com/128355
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/modcmd/download.go [new file with mode: 0644]
src/cmd/go/internal/modcmd/mod.go
src/cmd/go/internal/modfetch/cache.go
src/cmd/go/internal/modfetch/fetch.go
src/cmd/go/internal/modfetch/repo.go
src/cmd/go/internal/modload/build.go
src/cmd/go/testdata/script/mod_download.txt [new file with mode: 0644]