I have written a small go program, and I want to generate standalone HTML documents from source code that can be viewed without godoc server. But I can\'t find any way to achiev
This might not directly answer your question, but if you are planning to open source your project, you don't really have to generate HTML manually. Just make sure you have comments properly inserted in your source code, and use godoc.org( http://godoc.org/-/about ) to handle it.
It displays documentation for Go packages on Bitbucket, Github, Launchpad and Google Project Hosting.
Check this out for example: http://godoc.org/code.google.com/p/go.crypto/ssh