]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: document the -mod=mod option
authorAgniva De Sarker <agnivade@yahoo.co.in>
Fri, 15 Nov 2019 07:02:43 +0000 (12:32 +0530)
committerAgniva De Sarker <agniva.quicksilver@gmail.com>
Fri, 15 Nov 2019 18:31:19 +0000 (18:31 +0000)
Updates #33848

Change-Id: I505490906be7cd6fbcdc6a05c1017c779dbf7bba
Reviewed-on: https://go-review.googlesource.com/c/go/+/207397
Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/alldocs.go
src/cmd/go/internal/modload/help.go
src/cmd/go/internal/work/build.go

index 0be368d5601c32a02544ab4a913c3d5c6f8cb2a5..add11a47fed446702c0788d7049ab2b7d17729f1 100644 (file)
 //             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
 // 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
index 1927c1cff7363b639ca1bb9f68dbf39c67e67ecc..b47f3dedb372b5228133fa92fe8569c7f0980631 100644 (file)
@@ -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
index 45dd165ce02147555b0fa786f8eb104e71f32c6b..e3b25c937c345df292676d5ddde5fc0fea172477 100644 (file)
@@ -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