]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: document GOPATH default exception
authorRuss Cox <rsc@golang.org>
Wed, 30 Nov 2016 22:16:32 +0000 (17:16 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 30 Nov 2016 22:31:18 +0000 (22:31 +0000)
Doesn't get defaulted if $HOME/go is a GOROOT.

Change-Id: I6ac8211a74029e4ad70a50f6e7884a039a27ab05
Reviewed-on: https://go-review.googlesource.com/33720
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/go/alldocs.go
src/cmd/go/help.go

index 0272e185ab5ed8887dba8addb043ce82e34fb413..b4807420b076bb66579acd5d9591e5b4d12aad3f 100644 (file)
 //
 // If the environment variable is unset, GOPATH defaults
 // to a subdirectory named "go" in the user's home directory
-// ($HOME/go on Unix, %USERPROFILE%\go on Windows).
+// ($HOME/go on Unix, %USERPROFILE%\go on Windows),
+// unless that directory holds a Go distribution.
 // Run "go env GOPATH" to see the current GOPATH.
 //
 // Each directory listed in GOPATH must have a prescribed structure:
index 183b27e7e65788da0ad27f269cb3dedd596a55e8..fb69d8ec543c786e23279708edd9b6f93cfb4a29 100644 (file)
@@ -291,7 +291,8 @@ On Plan 9, the value is a list.
 
 If the environment variable is unset, GOPATH defaults
 to a subdirectory named "go" in the user's home directory
-($HOME/go on Unix, %USERPROFILE%\go on Windows).
+($HOME/go on Unix, %USERPROFILE%\go on Windows),
+unless that directory holds a Go distribution.
 Run "go env GOPATH" to see the current GOPATH.
 
 Each directory listed in GOPATH must have a prescribed structure: