From 0679039014b182a2547fa460f14819e9eeddc3bf Mon Sep 17 00:00:00 2001 From: imxyb Date: Wed, 30 Dec 2020 10:17:20 +0800 Subject: [PATCH] help: add doc for GO111MODULE. Fixes #43419 --- src/cmd/go/internal/help/helpdoc.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cmd/go/internal/help/helpdoc.go b/src/cmd/go/internal/help/helpdoc.go index 98f58441b4de60..7693a7bf1fdf2e 100644 --- a/src/cmd/go/internal/help/helpdoc.go +++ b/src/cmd/go/internal/help/helpdoc.go @@ -535,6 +535,14 @@ General-purpose environment variables: GOTMPDIR The directory where the go command will write temporary source files, packages, and binaries. + GO111MODULE + which can be set to one of three string values: off, on, or auto (the default). + If GO111MODULE=on, then the go command requires the use of modules, never consulting GOPATH. + We refer to this as the command being module-aware or running in "module-aware mode". + If GO111MODULE=off, then the go command never uses module support. + Instead it looks in vendor directories and GOPATH to find dependencies; we now refer to this as "GOPATH mode." + If GO111MODULE=auto or is unset, then the go command enables or disables + module support based on the current directory. Environment variables for use with cgo: