记录Go文件作者的姓名/电子邮件

huangapple go评论90阅读模式
英文:

Documenting name / email of author of Go file

问题

go文件的作者如何记录?

Go Doc对此没有提及。在Java中,有一个特殊的@author标签,可以列出所有的贡献者。不可接受的是在版本控制系统中引用代码提交。这不包含在代码中,如果导出的话会丢失。

澄清一下,我不想为整个项目或包添加作者信息作为元数据,就像上面提到的,它必须在文件级别上。

英文:

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.

答案1

得分: 0

Go语言没有这个东西。
虽然你可以从导入字符串中看到源代码仓库,但是go.mod文件包含了所有的依赖项。
在仓库中添加一个readme文件是你最好的选择。

英文:

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.

huangapple
  • 本文由 发表于 2022年7月15日 03:53:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/72985985.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定