Commit deee03f1 authored by Dave Cheney's avatar Dave Cheney

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
parent cc841761
...@@ -1915,7 +1915,7 @@ initializer can be a general expression computed at run time. ...@@ -1915,7 +1915,7 @@ initializer can be a general expression computed at run time.
var ( var (
home = os.Getenv("HOME") home = os.Getenv("HOME")
user = os.Getenv("USER") user = os.Getenv("USER")
goRoot = os.Getenv("GOROOT") gopath = os.Getenv("GOPATH")
) )
</pre> </pre>
...@@ -1944,11 +1944,11 @@ func init() { ...@@ -1944,11 +1944,11 @@ func init() {
if home == "" { if home == "" {
home = "/home/" + user home = "/home/" + user
} }
if goRoot == "" { if gopath == "" {
goRoot = home + "/go" gopath = home + "/go"
} }
// goRoot may be overridden by --goroot flag on command line. // gopath may be overridden by --gopath flag on command line.
flag.StringVar(&amp;goRoot, "goroot", goRoot, "Go root directory") flag.StringVar(&amp;gopath, "gopath", gopath, "override default GOPATH")
} }
</pre> </pre>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment