From: Agniva De Sarker Date: Fri, 15 Nov 2019 07:02:43 +0000 (+0530) Subject: cmd/go: document the -mod=mod option X-Git-Tag: go1.14beta1~192 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=398f9e1e1a2f9af255d6b6036f07ec93c5c61ddd;p=gostls13.git 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 TryBot-Result: Gobot Gobot Reviewed-by: Bryan C. Mills --- diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index 0be368d560..add11a47fe 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -148,7 +148,7 @@ // build code that will be linked against shared libraries previously // created with -buildmode=shared. // -mod mode -// module download mode to use: readonly or vendor. +// module download mode to use: readonly, vendor, or mod. // See 'go help modules' for more. // -modcacherw // leave newly-created directories in the module cache read-write @@ -2495,6 +2495,9 @@ // directory holds the correct copies of dependencies and ignores // the dependency descriptions in go.mod. // +// If invoked with -mod=mod, the go command loads modules from the module cache +// even if there is a vendor directory present. +// // Pseudo-versions // // The go.mod file and the go command more generally use semantic versions as diff --git a/src/cmd/go/internal/modload/help.go b/src/cmd/go/internal/modload/help.go index 1927c1cff7..b47f3dedb3 100644 --- a/src/cmd/go/internal/modload/help.go +++ b/src/cmd/go/internal/modload/help.go @@ -179,6 +179,9 @@ If invoked with -mod=vendor, the go command assumes that the vendor directory holds the correct copies of dependencies and ignores the dependency descriptions in go.mod. +If invoked with -mod=mod, the go command loads modules from the module cache +even if there is a vendor directory present. + Pseudo-versions The go.mod file and the go command more generally use semantic versions as diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go index 45dd165ce0..e3b25c937c 100644 --- a/src/cmd/go/internal/work/build.go +++ b/src/cmd/go/internal/work/build.go @@ -100,7 +100,7 @@ and test commands: build code that will be linked against shared libraries previously created with -buildmode=shared. -mod mode - module download mode to use: readonly or vendor. + module download mode to use: readonly, vendor, or mod. See 'go help modules' for more. -modcacherw leave newly-created directories in the module cache read-write