Reputation: 24920
Though go help
is useful, but still it's not as expressive as man pages.
So, any way to get man page for go binaries on unix based systems?
If not, why such a feature hasn't been done since golang is so popular nowadays?
Upvotes: 6
Views: 4070
Reputation: 24920
For Ubuntu, I found this solution: https://github.com/golang/go/wiki/Ubuntu
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt-get update
sudo apt-get install golang-go
Then man pages are available.
e.g
man go
man go-get # man page for `go get` sub command,
man gofmt
Tips:
$PATH
, the manually installed one is searched first.which go
, it will found the manually installed binary, instead of the one installed via apt-get
.Upvotes: 2
Reputation: 1324935
You have an alternative with goman, presented here
See the GitHub project christophberger/goman: that is not for Go itself, but could be adapted to generate the man page for Go.
Otherwise... go issue 101 is one of the oldest issues out there (2009), and still opened!
It was supposed to be fixed by an official goman command (see CL 5700081), but that never was completed.
Upvotes: 8