从 Github 项目的 godoc 中排除 README 部分
Excluding README section from godoc for Github project
我有一个Github project with README.md
. For the purpose of godoc, I added doc.go
file but didn't mean to include the README.md
in godoc. Currently the README is showing up as the first section in godoc。是否可以完全隐藏 README 部分?
Is it possible to hide the README section at all?
没有。除非您省略该文件或重命名它。
我找到了一个很好的解决方案,只需将您的 README.md
文件放在 docs
folder on Github 中,它不会显示在 godoc 中,但仍会显示在 Github 中。
我这样做是为了 my project on Github and you can see the godoc does not show the README.md
content。
编辑:
对您的 github 存储库进行适当的更改后,您将需要发布一个新的补丁版本以获取 pkg.go.dev
以使用更改进行更新。
我有一个Github project with README.md
. For the purpose of godoc, I added doc.go
file but didn't mean to include the README.md
in godoc. Currently the README is showing up as the first section in godoc。是否可以完全隐藏 README 部分?
Is it possible to hide the README section at all?
没有。除非您省略该文件或重命名它。
我找到了一个很好的解决方案,只需将您的 README.md
文件放在 docs
folder on Github 中,它不会显示在 godoc 中,但仍会显示在 Github 中。
我这样做是为了 my project on Github and you can see the godoc does not show the README.md
content。
编辑:
对您的 github 存储库进行适当的更改后,您将需要发布一个新的补丁版本以获取 pkg.go.dev
以使用更改进行更新。