godoc with homebrew installed Go30 Aug 2014
This is basically the same information as you would get if you RTFM1. When you install Go from Homebrew, it doesnʼt include
godoc which, is pretty annoying. The smart thing to do here would be to RTFM but, I didnʼt. Iʼm guessing that a bunch of other people wont as well. You can Google for the problem but, it doesnʼt immediately come up with a solution for the problem. So lets get back to that RTFM thing again.
So, to install godoc, set your
$GOPATH and then run
go get code.google.com/p/go.tools/cmd/godoc. Seems pretty simple right? Except, were is
godoc? It isnʼt at
$GOTPATH/bin. Turns out that it gets installed into goroot. Youʼll also need to add
/usr/local/opt/go/libexec/bin to your path. So, the 3 steps that need to be completed are:
- Make sure that your
$GOPATHis set already
go get code.google.com/p/go.tools/cmd/godoc
export PATH=$PATH:/usr/local/opt/go/libexec/binsomewhere in your dot files.
Read the Fucking Manual, for those of you that donʼt know. ↩