I know GO TOOLING, is something we as a community pride our self. After doing some research and speaking to people. in the community both online and offline, I have realized that official
go doc for offline documentation export is possibly lacking. Sorry to compare to JavaDoc, but needed some bench mark and I understand GoDoc has some cool things no one else has , but am only highlighting and calling a spade a spade (
Please dont be offended. I LOVE GO already, and here to make it better)
Below are list of points And below that I’ve listed my research / basis for saying this. Ams also pasting this on community as this is a request and I wonder how many in the community would agree beyond my initial find.
Note: Note using
wget is a Hack not a solution ; ive read posts encouraging this. And as a community if we are satisfied then no need to read this further. But if most feel its not then please read on.
Web access to live documentation is really cool; however I know a lot of people consume DOCs in offline mode. Maybe the Live approach is suited for CI/CD but not typical product delivery scenarios.
I’ve found the auto linking capability in Go Doc does not interpret my comment. In that case how can I specify a link to a relative path? (localhost, annotation?) … sorry didnt mean HOW as a HOW on community but rather a suggestion this is not clean.
Templatization, CSS or SCSS customization. I keep thinking am wrong and this must be there but I did not find anything to officially support it. My google search words were
Customize style "Godoc"and
Customize CSS "Go doc". Pretty also was there but nothing standard showed up. Surprising.
- A simple flag with the path to CSS can include it in all generated pages and assuming the standard docs use CSS selectors can be a quick win. If CSS path is relative, the file in included in the export; if absolute then no need to include.
- Also blank selectors for Logo etc can be provided.
- Quote from another experienced Gofer offline:
To generate Go-Doc offline it’s need some tricks to do. Actually GoDoc can provide export as HTML file as well, but its will require some efforts, so to minimalize it I used web scrapper tools to get offline GoDoc. Run it as usual then using web scrapper to capture all pages include all links have. May this is not a best practice but will save more time to get the result.