1
0
mirror of https://github.com/golang/go synced 2024-11-12 01:10:21 -07:00

doc/effective_go: stamp out stray GOROOT reference

Replaced with something more appropriate.

R=adg, r, minux.ma
CC=golang-dev
https://golang.org/cl/11421043
This commit is contained in:
Dave Cheney 2013-07-17 18:48:55 +10:00
parent cc84176108
commit deee03f17e

View File

@ -1915,7 +1915,7 @@ initializer can be a general expression computed at run time.
var (
home = os.Getenv("HOME")
user = os.Getenv("USER")
goRoot = os.Getenv("GOROOT")
gopath = os.Getenv("GOPATH")
)
</pre>
@ -1944,11 +1944,11 @@ func init() {
if home == "" {
home = "/home/" + user
}
if goRoot == "" {
goRoot = home + "/go"
if gopath == "" {
gopath = home + "/go"
}
// goRoot may be overridden by --goroot flag on command line.
flag.StringVar(&amp;goRoot, "goroot", goRoot, "Go root directory")
// gopath may be overridden by --gopath flag on command line.
flag.StringVar(&amp;gopath, "gopath", gopath, "override default GOPATH")
}
</pre>