-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Go 1.2 (devel) doesn't install godoc into bin #23281
Comments
Would review a pull request to fix this, but if they're not being installed then they probably aren't being build to the expected place. Do the 1.2 pre-release Go docs make any mention of a change here? |
We've had a newer developer release go into this repo since this was opened; I don't know if it solves this problem, but the solution is to modify the formula to do what you want. |
godoc was separated from the Go installation (as was the vet tool). The commands provided to install godoc & vet: go install code.google.com/p/go.tools/cmd/godoc
go install code.google.com/p/go.tools/cmd/vet What's happening is that godoc & vet are not installed into a known bin path, as they are installed into $GOROOT instead of $GOPATH ($GOPATH is what most devs would export in their .bashrc or manually from terminal, as well as add to their $PATH). Solution is to add $GOROOT export to .bashrc and $PATH, like so: export GOROOT=`go env GOROOT`
export PATH=$PATH:$GOROOT/bin After exporting that updated $PATH into your shell env (via .bashrc or manual), you should then be able to access the godoc command. |
go get worked for me
|
@rofrol, as I noted above, it's not that godoc isn't available, it's that what is installed isn't immediately available in your PATH. Haven't tested latest, but at the time of my post (4 months ago), updating PATH made godoc available to me, similar to how you're having to call godoc using |
👍 @rofrol I installed go via Homebrew, and ended up running
then
and finally in your open shells:
Note, godoc required me to install Mercurial (though I thought it'd been installed a long time ago for some other dependency |
instead of using |
Anyone know why using |
Bottles and installs `godoc` and `go vet` unless requested otherwise. Closes #37133 Past references: 1) #23281 2) #25210 Closes #37159. Signed-off-by: Mike McQuaid <[email protected]>
When building using
brew install --devel go
, thegodoc
command is not installed withgo
andgofmt
into bin.The text was updated successfully, but these errors were encountered: