Description
What version of Go are you using (go version
)?
go version go1.10.1 darwin/amd64
Does this issue reproduce with the latest release?
Yes.
What did you do?
-
Visit https://golang.org/dl/ and download a go1.10.1 tarball
-
Install to a custom location:
$ cd /tmp $ tar -xzf ~/Downloads/go1.10.1.darwin-amd64.tar.gz $ go/bin/go env GOROOT /tmp/go
-
Visit https://golang.org/doc/install#tarball_non_standard and see the installation instructions
What did you expect to see?
No need to set GOROOT, as it is indeed not necessary in Go 1.10.
What did you see instead?
For example, if you installed Go to your home directory you should add commands like the following to $HOME/.profile:
export GOROOT=$HOME/go1.X export PATH=$PATH:$GOROOT/bin
Note: GOROOT must be set only when installing to a custom location.
In #18678 (comment), @minux proposed to derive GOROOT from os.Executable
...
And then we can eliminate all mentions of GOROOT in user facing documents (in fact, we should actively discourage setting GOROOT in user facing documents.)
The change was implemented in CL 42533, but the documentation was not updated to remove suggestions to set GOROOT.
Activity
gopherbot commentedon Apr 30, 2018
Change https://golang.org/cl/110435 mentions this issue:
doc: remove GOROOT custom install instruction