Email or username:

Password:

Forgot your password?
Top-level
Alex Schroeder

I'm looking at the tools available, like go doc and pgksite and at my program (a "command"), and I'm confused. I think the tools are geared towards the documentation of libraries. For example, my command doesn't export any functions. Why should it? The result is that the documentation tools don't show any of the documentation I have written. In other words, if I want documentation to be available for developers in long form (remember my starting point is literate programming), then the go documentation tools seem to be unsuitable unless I pack it all into a single file. If I write a comment for the main function that says "main calls [serve] when Oddmu is called without arguments and [commands] when called with arguments." then it will not get rendered because main is not exported.

2 comments
Alex Schroeder

I learned about go doc -all -u which gives me a cool text file to read, including an introduction from documentation at the package level. Since the output is not in reading order, working links seem essential, however. That'd be the hacking documentation hypertext I'd like to see. go doc doesn't have an option to produce HTML and pkgsite doesn't have an option to show unexported symbols, however. Perhaps what's confusing me even more (the keywords "go", "doc" and "html" are not helping) is that go doc and godoc are two different tools?

I learned about go doc -all -u which gives me a cool text file to read, including an introduction from documentation at the package level. Since the output is not in reading order, working links seem essential, however. That'd be the hacking documentation hypertext I'd like to see. go doc doesn't have an option to produce HTML and pkgsite doesn't have an option to show unexported symbols, however. Perhaps what's confusing me even more (the keywords "go", "doc" and "html" are not helping) is that

Alex Schroeder

Well, godoc seems to have the same limitation as pkgsite: exported symbols only. So now I'm thinking … and maybe that's my two Perl and Emacs heads showing … perhaps I should just export it all?

Go Up