When trying to figure out how go doc
command works, I just found out that I don’t need to use it.
There’s an incredible feature of Go documentation website: it can generate and display the documentation of all your project, straight from GitHub – and other websites too. The generated HTML is very polished.
To use it, append your GitHub user name and repo to their URL, such as:
https://godoc.org/github.com/username/reponame
Even more interesting: all types and Go built-in types are automatically linked. And it also provides direct links to GitHub source files. On top of all that, it’s very fast. Written in Go, I suppose.
Being a C language admirer, the more I work with Go, the more I like its simplicity.