Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refer a different package from the godoc of a package

Tags:

go

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.

like image 227
tuk Avatar asked Sep 24 '16 07:09

tuk


1 Answers

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.

like image 50
xh3b4sd Avatar answered Nov 10 '22 22:11

xh3b4sd