-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Go Caveats #31288
Go Caveats #31288
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,9 +78,16 @@ def caveats; <<-EOS.undent | |
To get `go vet` and `go doc` run: | ||
go get code.google.com/p/go.tools/cmd/godoc | ||
go get code.google.com/p/go.tools/cmd/vet | ||
Note to use go get you will need 'Mercurial' installed. | ||
|
||
There are issues with go & non-default shells. | ||
If you're using zsh you'll need to modify your .zshrc file to include: | ||
export GOPATH=$HOME/go | ||
or similar, depending on your setup. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you have a reproducible failure case? Pretty sure environment variables like this won't fail just based on your shell unless Go is added stuff to e.g. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried both Fish & zsh and failed on both of them. It's pretty easy to reproduce.
Close Terminal & Re-Open:
It's the same with setting $PATH inside Fish or zsh. Unless you either use the global path in /etc/paths or set the $PATH in The problem is that both fish & zsh read from their own config files for such things, so unless you set the variable permanently in that shells config it won't sustain throughout new tabs/windows/etc. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's expected behaviour; bash will do the same thing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Aye. I just wondered whether it was worth chucking in a notation about that behaviour, given Go tells people to use the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We try to keep the Homebrew caveats limited to stuff that's Homebrew specific i.e. only applies to the Homebrew There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool. I appreciate that. Will bear it in mind for the future 😄. If you're not a go (no pun intended) on the Mercurial line either this can be closed. |
||
|
||
You may wish to add the GOROOT-based install location to your PATH: | ||
export PATH=$PATH:#{opt_libexec}/bin | ||
If you aren't using the default shell you may need to manually modify your shell profile or /etc/paths. | ||
EOS | ||
end | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that not just for mercurial repos?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to be for any 'Go' project hosted on code.google.com, and so far I'm struggling to find 'Go' projects that don't tap at least one of the many go resources hosted on code.google.com.
I'm willing to remove the line though. Chances are 90%+ of people using Google Go are likely to have Mercurial installed already and so it may well be redundant.