Open KantarBruceAdams opened 6 years ago
The docs are at http://golang.org/doc/articles/godoc_documenting_go_code.html . There is a link to that page from the godoc documentation at https://godoc.org/golang.org/x/tools/cmd/godoc .
It would help if you could point out areas where that could be improved. Thanks.
That document is a great one page introduction. It is not a specification. A specification need not be very long but I think it would be useful. It could be similar to a cheat sheet. The blog page does not:
Some additional points here - https://golang.org/doc/effective_go.html#commentary.
I just discovered build constraints as another semantic use of comments built into go
https://golang.org/pkg/go/build/#hdr-Build_Constraints
These really all should be documented together. To an outsider it feels like a design smell that comments can be used for so many different things.
Titles feature is not documented in the article https://godoc.org/github.com/fluhus/godoc-tricks#Titles
The good folks over at stackoverflow don't like my quite reasonable question asking where is the specification for godoc itself
The language specification doesn't mention that go:generate is special or that godoc comments exist. The full rules should be documented somewhere other than in the gogenerate and godoc tools source.
Repeating that here: