Skip to content

Commit 0679039

Browse files
committed
help: add doc for GO111MODULE.
Fixes #43419
1 parent 780b4de commit 0679039

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/cmd/go/internal/help/helpdoc.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,14 @@ General-purpose environment variables:
535535
GOTMPDIR
536536
The directory where the go command will write
537537
temporary source files, packages, and binaries.
538+
GO111MODULE
539+
which can be set to one of three string values: off, on, or auto (the default).
540+
If GO111MODULE=on, then the go command requires the use of modules, never consulting GOPATH.
541+
We refer to this as the command being module-aware or running in "module-aware mode".
542+
If GO111MODULE=off, then the go command never uses module support.
543+
Instead it looks in vendor directories and GOPATH to find dependencies; we now refer to this as "GOPATH mode."
544+
If GO111MODULE=auto or is unset, then the go command enables or disables
545+
module support based on the current directory.
538546
539547
Environment variables for use with cgo:
540548

0 commit comments

Comments
 (0)