I've been wrestling with godoc and found that "go doc" is more for providing usage help from the command line for instance:
go doc -cmd -u
lists the package comment and any functions (or other entities)
go doc *function*
then shows the documentation for an individual function (or other entity)
It seems there is a related tool called godoc. godoc also seems to generate html on a per package and function basis. E.g.
godoc -html hello
Generates html containing the package comment only to stdout
godoc is a really confusing name given we have go doc as well!
How can I create static documentation for the whole project?
This is similar to Godoc, create html for entire package which may have been misinterpreted as asking about documentation for packages rather than projects. I want a build step I can use in a project that may in principle contain many packages and apps.
godoc
by default. Command line use ofgodoc
to print documentation will be phased out in the next release of Go. At the same time, thego doc
command will gain the ability to print the doc for an entire package.go doc
is a command line tool and integrates well into editors or IDEs whilegodoc -http :6060
lets you browse the whole documentation of all your Go packages.gvm