简体   繁体   中英

Documenting name / email of author of Go file

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM