mirror of
https://github.com/golang/go
synced 2024-11-26 20:11:26 -07:00
cmd/go: document 'go env GOMOD' outside modules
In documentation for 'go env GOMOD', note that the path will be os.DevNull in module-aware mode when no go.mod file is present. Fixes #36052 Change-Id: I30ced1df02ccefe1970bd856190e79d6f0384375 Reviewed-on: https://go-review.googlesource.com/c/go/+/210577 Run-TryBot: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com>
This commit is contained in:
parent
7d24e9581a
commit
3a3093d5c7
@ -1726,8 +1726,10 @@
|
||||
// GOHOSTOS
|
||||
// The operating system (GOOS) of the Go toolchain binaries.
|
||||
// GOMOD
|
||||
// The absolute path to the go.mod of the main module,
|
||||
// or the empty string if not using modules.
|
||||
// The absolute path to the go.mod of the main module.
|
||||
// If module-aware mode is enabled, but there is no go.mod, GOMOD will be
|
||||
// os.DevNull ("/dev/null" on Unix-like systems, "NUL" on Windows).
|
||||
// If module-aware mode is disabled, GOMOD will be the empty string.
|
||||
// GOTOOLDIR
|
||||
// The directory where the go tools (compile, cover, doc, etc...) are installed.
|
||||
//
|
||||
|
@ -621,8 +621,10 @@ Additional information available from 'go env' but not read from the environment
|
||||
GOHOSTOS
|
||||
The operating system (GOOS) of the Go toolchain binaries.
|
||||
GOMOD
|
||||
The absolute path to the go.mod of the main module,
|
||||
or the empty string if not using modules.
|
||||
The absolute path to the go.mod of the main module.
|
||||
If module-aware mode is enabled, but there is no go.mod, GOMOD will be
|
||||
os.DevNull ("/dev/null" on Unix-like systems, "NUL" on Windows).
|
||||
If module-aware mode is disabled, GOMOD will be the empty string.
|
||||
GOTOOLDIR
|
||||
The directory where the go tools (compile, cover, doc, etc...) are installed.
|
||||
`,
|
||||
|
Loading…
Reference in New Issue
Block a user