A manual page generator and viewer for Go packages.
Please note that this code is very ugly. I am not proud of it, but it gets the job done (sort of). I originally created it to improve the experience of developing in a non-graphical environment. I also wanted to avoid emacs' documentation display shortcomings and not rely on a web browser (I am not a fan of that trend in Go or Rust).
- Generate manual pages for Go packages based on their Go docs
- Specify documentation for specific OS and CPU architectures using environment variables or arguments
- Caches manual pages for offline use in
~/.gman - No external Go dependencies (though it requires
goandman)
go(for documentation generations)man/less(for viewing the manual pages)
go install gitlab.com/stephen-fox/gman@latestgman [options] GO-PACKAGE-IDGenerate and view the "crypto/tls" library manual:
$ gman crypto/tlsGenerate and view the manual for "golang.org/x/sys/unix" for FreeBSD:
$ gman -s freebsd golang.org/x/sys/unixGenerate and view the manual for v0.4.0 of "golang.org/x/crypto/ssh":
$ gman golang.org/x/crypto/[email protected]Generate the manual for the "syscall" library for OpenBSD and exit:
$ gman -G -s openbsd syscall