generate godoc documentation for an entire project?

is there a canonical way to generate documentation for offline use even using godoc?

Go 1.12 (February 2019) is clearer on that:

godoc and go doc

In Go 1.12, godoc no longer has a command-line interface and is only a web server.
Users should use go 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 the godoc command line used to do.

cmd/doc: add -all flag to print all documentation for package

Unlike the one for the old godoc, you need the -u flag to see unexported symbols.
This seems like the right behavior: it’s consistent.

Leave a Comment