Welcome to doc2go

Gopher on a flying sheet of paper

Get Started Installation

Your Go documentation, to-go.

doc2go is a tool that generates static HTML documentation from your Go code. It’s a simpler, self-hosted alternative to services like https://pkg.go.dev/ and https://godocs.io/.

You can use doc2go to generate standalone HTML websites (example), or embed your documentation inside another static website (example).

Publish to GitHub Pages Embed into another website

Usage can be as simple as:

mkdir www
doc2go -out www/ ./...

Easy to publish

doc2go generates static websites that you can host on GitHub Pages or any other static website hosting service.

Read more …

Everything in one place

Embed your API Reference into a bigger static website with Hugo or Jekyll. All your documentation in one place, on one website.

Read more …

Syntax highlighting

Get syntax highlighting in your documentation out of the box. Choose from over 50 themes.

Read more …

Style it your way

With embedding, doc2go gives you full control of your documentation’s CSS. Brand it, style it, go wild.

Take it with you

Store offline copies of API documentation for projects you use frequently. Keep using it even with a bad internet connection.


doc2go is lightweight and composes with other systems instead of trying to replace them.