drzil26260 2014-05-15 14:54
浏览 117
已采纳

如何使godoc链接到github上的源代码

On the godoc site, most libraries (http://godoc.org/github.com/beego/memcache for example) link directly to the source on github. When I run the godoc tool locally, this is not the case. We also have a local godoc server for our team, and it similarly does not link to the source on github. Our code is stored on github, and is organized accordingly (ie, github.com/mycompany/packagename). Is there a way to tell the godoc tool to link to code on github, even if it's in a private repo?

  • 写回答

1条回答 默认 最新

  • drti52047 2014-05-16 12:40
    关注

    As mentioned in the comments, godoc (Go Doc Dot Org) generates its own links to the source.

    You can see that generation in gddo-server/template.go#L49-L62 SourceLink().

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?