is there a canonical way to generate documentation for offline use even using godoc?
Go 1.12 (February 2019) is clearer on that:
godoc
andgo doc
In Go 1.12,
godoc
no longer has a command-line interface and is only a web server.
Users should usego doc
for command-line help output instead.
go doc
now supports the-all
flag, which will cause it to print all exported APIs and their documentation, as thegodoc
command line used to do.
cmd/doc
: add-all
flag to print all documentation for packageUnlike the one for the old
godoc
, you need the-u
flag to see unexported symbols.
This seems like the right behavior: it’s consistent.