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.
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>
......
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