How is the author of a go file documented?
The Go Doc does not say a word about this. In Java there is a special @author
tag where all contributors can be listed. Not acceptable is to refer to the code commits in the version control system. This is not contained with the code and would be lost if exported.
To clarify, I do NOT want to add author information for a complete project or package as metadata, like mentioned above it must be on file level.
Go doesn't have this thing. You can see the source repository from the import string though, also go.mod contains all the dependencies. Adding a readme file on the repository is your best bet.