Generate static Go documentation
Go to file
2023-11-08 21:24:26 -08:00
.gitignore Initial commit 2020-02-06 08:37:24 -08:00
badge.svg Initial commit 2020-02-06 08:37:24 -08:00
CHANGELOG Migrate to 2023-11-08 21:24:26 -08:00
cmd.go Add --exclude flag and fix compilation on Windows 2020-02-07 07:38:30 -08:00
cmd_linux.go Add --exclude flag and fix compilation on Windows 2020-02-07 07:38:30 -08:00
go.mod Migrate to 2023-11-08 21:24:26 -08:00
go.sum Update CHANGELOG 2023-11-08 21:20:18 -08:00
LICENSE Initial commit 2020-02-06 08:37:24 -08:00
main.go Retry executing godoc 2023-11-02 23:37:17 -07:00
page.go Migrate to 2023-11-08 21:24:26 -08:00 Migrate to 2023-11-08 21:24:26 -08:00



Generate static Go documentation


Rocket 9 Labs Documentation


Install godoc-static:

go install

Also install godoc:

go install


To generate documentation for specific packages, execute godoc-static supplying at least one package import path and/or absolute path:

godoc-static -destination=/home/user/sites/docs fmt net/http ~/awesomeproject

When an import path is supplied, the package is sourced from $GOPATH or $GOROOT.

When no packages are supplied, documentation is generated for packages listed by go list ....

Packages are not downloaded/updated automatically.

Usage examples

Generate documentation for archive, net/http and ~/go/src/

godoc-static \
    -site-name="Rocket 9 Labs Documentation" \
    -site-description-file=/home/user/sitefiles/ \
    -destination=/home/user/sites/docs \
    archive net/http



Path to write site to.


Space-separated list of packages to exclude from the index.

Link to index.html instead of folder.


Address for godoc to listen on while scraping pages.


Site description (markdown-enabled).


Path to markdown file containing site description.

Site footer (markdown-enabled).

Path to markdown file containing site footer.


Site name.


Disable all logging except errors.


Enable verbose logging.


Site ZIP file name.


Please share issues and suggestions here.