啊啊啊小孔 2016-09-24 07:14
浏览 38
已采纳

引用与软件包的godoc不同的软件包

Can someone let me know if it is possible to refer a different package from godoc of a package? For example let's say I have a package src/logger/. In src/logger/doc.go I need to refer src/config/. Something like @see in javadoc.

Is there a recommended way?

I am on Go 1.7.

  • 写回答

1条回答 默认 最新

  • doulou0882 2016-09-24 14:22
    关注

    I am not aware that this is currently possible. E.g. https://golang.org/pkg/io/ioutil/#TempFile refers to the os package simply using *os.File. See the source code comments at https://golang.org/src/io/ioutil/tempfile.go#L40.

    and writing, and returns the resulting *os.File.

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

报告相同问题?