Skip to content

Commit 398f9e1

Browse files
committed
cmd/go: document the -mod=mod option
Updates #33848 Change-Id: I505490906be7cd6fbcdc6a05c1017c779dbf7bba Reviewed-on: https://go-review.googlesource.com/c/go/+/207397 Run-TryBot: Agniva De Sarker <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]>
1 parent 3bea90d commit 398f9e1

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/cmd/go/alldocs.go

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cmd/go/internal/modload/help.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ If invoked with -mod=vendor, the go command assumes that the vendor
179179
directory holds the correct copies of dependencies and ignores
180180
the dependency descriptions in go.mod.
181181
182+
If invoked with -mod=mod, the go command loads modules from the module cache
183+
even if there is a vendor directory present.
184+
182185
Pseudo-versions
183186
184187
The go.mod file and the go command more generally use semantic versions as

src/cmd/go/internal/work/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ and test commands:
100100
build code that will be linked against shared libraries previously
101101
created with -buildmode=shared.
102102
-mod mode
103-
module download mode to use: readonly or vendor.
103+
module download mode to use: readonly, vendor, or mod.
104104
See 'go help modules' for more.
105105
-modcacherw
106106
leave newly-created directories in the module cache read-write

0 commit comments

Comments
 (0)