Gold is an experimental Go local docs server and Go docs generation tool.
Demo: the generated docs for standard packages.
Code: on github. Any feedback, including PR and bug reports, are welcomed.
Please follow Go100and1 to get the latest news of Gold.
gold .
to show docs of the package in the current directory (and all its dependency packages).gold ./...
to show docs of all the package under the current directory (and all their dependency packages).gold std
to show docs of standard pacakges.
Each of the above commands will open a browser window automatically.
We can use the -s
or -silent
options to turn off the behavior.
gold -gen -dir=generated .
gold -gen -dir=generated ./...
gold -gen -dir=generated std
The -dir
option is optional and its default value is .
(the working directory).
Please read the project readme file to get more options.
The third usage of Gold is to serve files within a directory.
For example, we can run gold -dir=.
(or simply gold
)
from the HTML docs generation directory to view the generated docs in browser.
"Gold" is an abbreviation of Go local docs server/generator.
I didn't find a Go tool showing type implementation relations, so I decided to write one. In doing this, I got many new ideas which form the tool to the final Gold design.
Yes. But if you do want to serve your package docs on Internet, it is best to serve the generated HTML static doc pages to lower the server cost.
If a Go project needs cgo, then a proper C/C++ compiler is needed.
Some projects might need large memory capacity to analyze. For example, the recommended memory capacity to analyze the Kubernetes project is 8G+. However, 500M to 2G memory is okay for most Go projects.