-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: code.html page assumes GOPATH is not a list #28905
Comments
The documentation explicitly mentions how to set a GOPATH here - https://golang.org/doc/code.html#GOPATH and goes forward with that assumption. Technically, the documentation is correct in that regard. Maybe we can add another line saying that GOPATH can have multiple values. But given the fact that we are sunsetting GOPATH, I wouldn't worry about adding further corner cases to it. |
(People who like this bug also like #18119) |
This is originally (some later modifications added) of what I wanted a Wiki page to look like. |
R.C. once wrote about something like $GOROOT/HACKING.md (to match src/runtime/HACKING.md and maybe others), maybe such (circa 2017) consideration should be revisited, as that content could go in such an .md file. |
/cc @bcmills for decision. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
Outputcat /etc/issue
Welcome to openSUSE Tumbleweed 20181103
What did you do?
Use the documentation page https://golang.org/doc/code.html to try and set up and use go
to run initial examples
The documentation assumes that the go env GOPATH returns a single path not a list of paths.
go env GOPATH
/home/matthew/go:/usr/share/go1.4/contrib
This means that passages like this do not work.
An obvious workaround in my case is to use sed but it would make the documentation page less readable.
$ mkdir $(echo "$GOPATH" | sed 's/:.*//g')src/github.com/user/hello
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: