]> Cypherpunks repositories - gostls13.git/commit
go/build: implement default GOPATH
authorFrancesc Campoy <campoy@golang.org>
Tue, 1 Nov 2016 04:36:38 +0000 (21:36 -0700)
committerFrancesc Campoy Flores <campoy@golang.org>
Fri, 11 Nov 2016 00:44:28 +0000 (00:44 +0000)
commitdc4a815d100b82643656ec88fd9fa8e7c705ebba
tree05bbc844cb57d1cc97fb8480fab020f73ef42427
parentebc0b625a07ccce6ade7a0082f4ab49c2817e965
go/build: implement default GOPATH

Whenever GOPATH is not defined in the environment, use $HOME/go
as its default value. For Windows systems use %USERPROFILE%/go
and $home/go for plan9.

The choice of these environment variables is based on what Docker
currently does. The os/user package is not used to avoid having
a cgo dependency.

Updates #17262. Documentation changes forthcoming.

Change-Id: I6368fbfbc5afda99d6e64c35c1980076fcf45344
Reviewed-on: https://go-review.googlesource.com/32019
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/go/env.go
src/cmd/go/get.go
src/cmd/go/go_test.go
src/cmd/go/main.go
src/go/build/build.go