Directives are excluded from extracted docs (#37974). In addition to comments matched by the //[a-z0-9]+:[a-z0-9] pattern, the //line comment is excluded. Maybe the CGO //export comment should be excluded as well.
The text was updated successfully, but these errors were encountered:
Wouldn't one want to see //export comments in documentation? How would one be able to tell that the marked Go function can be used from C?
But assuming that excluding these comments in the documentation is ok, moving to //go:export would not require another special case which I think would be preferable. The tools would have to recognize both indefinitely (or at least for a some time), but over time the //export comments would disappear in the documentation as code is adjusted. Does that sound about right?