logoalt Hacker News

jryiotoday at 3:52 PM1 replyview on HN

The godoc format enforces that the comment start with the name of the identifier and be a complete sentence(s) describing what that identifier does. Predates LLMs


Replies

badc0ffeetoday at 8:50 PM

I wouldn't say it enforces that the comment start with the name of the identifier. Maybe certain linter options enforce that?

In https://go.dev/doc/comment it seems to be a convention, but there are a couple of examples there where the don't follow it.