]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: document go env GOMOD
authorRuss Cox <rsc@golang.org>
Tue, 24 Jul 2018 18:41:44 +0000 (14:41 -0400)
committerRuss Cox <rsc@golang.org>
Sat, 28 Jul 2018 01:14:50 +0000 (01:14 +0000)
Fixes #26500.

Change-Id: I0a00009ce10f7aab3e6e79f7218307c3008422d1
Reviewed-on: https://go-review.googlesource.com/125655
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/help/helpdoc.go

index c6dfaad4c6a560e1b7e2eeb5304be53fe61629d7..b5fab2f21e26cfc90e76d7366ffb984864530eb3 100644 (file)
@@ -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.
        `,
 }