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
cmd/go: "go help gopath" gives no information on how to set $GOPATH #18294
Comments
go help gopath
gives no information on how to set $GOPATH
We can mention an example GOPATH in the beginning but with Go 1.8, GOPATH will be optional and "$GOPATH not set" error message will not be exposed to the user the way it is now. |
Still, we should point people at a guide for how to set environment variables. We have https://golang.org/doc/code.html but it says nothing about Windows environment variables, even though Windows is a huge percentage of our users/downloads. |
@rakyll, FWIW, you still get GOPATH not set errors if you have the main Go development repo checked out in $HOME/go. In that case GOPATH has no default setting. The text for setting the environment variable should be in 'go help gopath', since that's the definitive text and since code.html links to it for more details. |
CL https://golang.org/cl/34821 mentions this issue. |
Updates #18294. Change-Id: Ib6b84243a15ed921cc8960e5fa355fd7594181e6 Reviewed-on: https://go-review.googlesource.com/34821 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Well, we created https://golang.org/wiki/EnvVariables#gopath, but I guess it is not reasonable to give a link to this page from |
It's not breakable by "anyone". Our wiki is (for better or worse) somewhat locked down. |
wiki links are more likely to go stale or get broken - please link to the website where we have control over URLs and redirects. |
@broady, I disagree. We have control over golang.org/wiki/ redirects too. And the content is much easier to update, and requires less stringent code review process, which is rarely required. |
The website links to the wiki as well. Even if we link to the website, the next step will be broken. We either need to move the content to a golang.org page or accept the risk and keep an eye on it. On the brighter side, I assume that any broken link will be reported immediately by the users. That gives me more confidence to give a link from the tool to the wiki. |
CL https://golang.org/cl/34918 mentions this issue. |
The website can be updated, the "go" command cannot (as easily). It's baked into the binary. |
We own the wiki. Wiki can be fixed very easily to keep serving the right content. |
What version of Go are you using (
go version
)?go version go1.7.4 windows/amd64
What operating system and processor architecture are you using (
go env
)?Windows 10 (amd64)
What did you do?
I installed Go and tried to install golint (
go get -u -v github.com/golang/lint/golint
), but got the following error:What did you expect to see?
I expected information on how to resolve the error. Namely: How to set $GOPATH.
What did you see instead?
I typed
go help gopath
and got a lot of details about $GOPATH and what it is used for and the directory structure(s) it requires, but no details on how to actually set the $GOPATH.The text was updated successfully, but these errors were encountered: