Gold

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.

Usages

The main usage of Gold is to start a local docs server for a project, to either read package docs or study source code of the project. We can

Each of the above commands will open a browser window automatically. We can use the -s or -silent flags to turn off the behavior.

The second usage of Gold is to generate static HTML doc pages for a project:

The -dir flag is optional and its default value is . (the working directory).

The third usage of Gold is to serve files within a directory. For example, we can run gold -dir=. from the HTML docs generation directory to view the generated docs.

FAQ

What does Gold mean?

"Gold" is an abbreviation of Go local docs server/generator.

Why Gold?

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.

Is Gold recommended to run locally?

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.

What are the requirements to run Gold?

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.