From 011b6ff8d7b121a0d9c6a7dc899591d89dc9712e Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 24 Jul 2018 14:41:44 -0400 Subject: [PATCH] cmd/go: document go env GOMOD Fixes #26500. Change-Id: I0a00009ce10f7aab3e6e79f7218307c3008422d1 Reviewed-on: https://go-review.googlesource.com/125655 Reviewed-by: Bryan C. Mills --- src/cmd/go/internal/help/helpdoc.go | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/cmd/go/internal/help/helpdoc.go b/src/cmd/go/internal/help/helpdoc.go index c6dfaad4c6..b5fab2f21e 100644 --- a/src/cmd/go/internal/help/helpdoc.go +++ b/src/cmd/go/internal/help/helpdoc.go @@ -501,10 +501,6 @@ General-purpose environment variables: GOTMPDIR The directory where the go command will write temporary source files, packages, and binaries. - GOTOOLDIR - The directory where the go tools (compile, cover, doc, etc...) - are installed. This is printed by go env, but setting the - environment variable has no effect. Environment variables for use with cgo: @@ -573,6 +569,20 @@ Special-purpose environment variables: Defined by Git. A colon-separated list of schemes that are allowed to be used with git fetch/clone. If set, any scheme not explicitly mentioned will be considered insecure by 'go get'. + +Additional information available from 'go env' but not read from the environment: + + GOEXE + The executable file name suffix (".exe" on Windows, "" on other systems). + GOHOSTARCH + The architecture (GOARCH) of the Go toolchain binaries. + 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. + GOTOOLDIR + The directory where the go tools (compile, cover, doc, etc...) are installed. `, } -- 2.50.0