aboutsummaryrefslogtreecommitdiff
path: root/_content/ref/mod.md
diff options
context:
space:
mode:
authorHana (Hyang-Ah) Kim <hyangah@gmail.com>2023-01-27 10:43:04 -0500
committerHyang-Ah Hana Kim <hyangah@gmail.com>2023-01-27 22:38:43 +0000
commit381c3ae6b2f5d126f3d10df4ee374c9824a0286c (patch)
treec97da902a66e49345cd7ef9f9c9a2963c450de1e /_content/ref/mod.md
parentbdf3f823b5344dea7da84dd90e53daab03e0a131 (diff)
downloadgo-x-website-381c3ae6b2f5d126f3d10df4ee374c9824a0286c.tar.xz
_content/ref: mention '-reuse' flag in go mod download section
The section was copied from `go help mod download`. Change-Id: Icca24cf1cbd4051332df21843ffd2ff818d77d2d Reviewed-on: https://go-review.googlesource.com/c/website/+/463875 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com>
Diffstat (limited to '_content/ref/mod.md')
-rw-r--r--_content/ref/mod.md10
1 files changed, 9 insertions, 1 deletions
diff --git a/_content/ref/mod.md b/_content/ref/mod.md
index 5f5e95f7..2f4145c0 100644
--- a/_content/ref/mod.md
+++ b/_content/ref/mod.md
@@ -1825,7 +1825,7 @@ field.
Usage:
```
-go mod download [-json] [-x] [modules]
+go mod download [-x] [-json] [-reuse=old.json] [modules]
```
Example:
@@ -1873,6 +1873,14 @@ type Module struct {
The `-x` flag causes `download` to print the commands `download` executes
to standard error.
+The -reuse flag accepts the name of file containing the JSON output of a
+previous 'go mod download -json' invocation. The go command may use this
+file to determine that a module is unchanged since the previous invocation
+and avoid redownloading it. Modules that are not redownloaded will be marked
+in the new output by setting the Reuse field to true. Normally the module
+cache provides this kind of reuse automatically; the -reuse flag can be
+useful on systems that do not preserve the module cache.
+
### `go mod edit` {#go-mod-edit}
Usage: