3 ms·
Certain comments have a special meaning to some tooling. In this sense, it's not very different from Javadocs. For some examples: A comment that appears right
by fwip 6y ago
Certain comments have a special meaning to some tooling. In this sense, it's not very different from Javadocs.
For some examples:
A comment that appears right before a type or function definition is exported as documentation by the "go doc" tool.
Another one is build constraints, which appear as a comment at the top of the file, like: `// +build linux` to say "only include this file if the build target is linux."
Other tools use their own comment format to recognize comments meant for them.