diff options
| author | Hana (Hyang-Ah) Kim <hyangah@gmail.com> | 2023-01-27 10:43:04 -0500 |
|---|---|---|
| committer | Hyang-Ah Hana Kim <hyangah@gmail.com> | 2023-01-27 22:38:43 +0000 |
| commit | 381c3ae6b2f5d126f3d10df4ee374c9824a0286c (patch) | |
| tree | c97da902a66e49345cd7ef9f9c9a2963c450de1e /_content/ref/mod.md | |
| parent | bdf3f823b5344dea7da84dd90e53daab03e0a131 (diff) | |
| download | go-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.md | 10 |
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: |
