godoc and 1.19 "Doc links"

瀏覽次數:540 次
跳到第一則未讀訊息

TheDiveO

未讀,
2022年6月25日 下午3:54:312022/6/25
收件者:golang-nuts
Using go1.19beta1 I installed godoc using "go1.19beta1 install golang.org/x/tools/cmd/godoc@latest". Then I tried to create a "Doc link" as per https://tip.golang.org/doc/comment, section heading "Doc link", running a godoc server on localhost:6060.

In package documentation for github.com/thediveo/whalewatcher I want to reference the Watcher interface in package github.com/thediveo/whalewatcher/watcher.

At first, I tried "[watcher.Watcher]": this gets rendered as non-linked text "[watcher.Watcher]". On a side note, the modules root package does not import the watcher package, if that might be somehow of importance?

Then I tried "[github.com/thediveo/whalewatcher/watcher.Watcher]": this now gets renderes as a link to http://localhost:6060/github.com/thediveo/whalewatcher/watcher#Watcher -- but this link is invalid, the correct link should instead should include "/pkg" ... http://localhost:6060/pkg/github.com/thediveo/whalewatcher/watcher#Watcher.

What am I doing wrong? Besides using godoc, that is...

Sean Liao

未讀,
2022年6月25日 下午4:22:472022/6/25
收件者:golang-nuts
I believe the answer is using godoc
That would be a correct link if you used pkgsite


- sean

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/1d174ac3-ac39-494e-b9ba-b2ff45d52b7an%40googlegroups.com.

TheDiveO

未讀,
2022年6月25日 晚上7:13:012022/6/25
收件者:golang-nuts
But without godoc there's still to sensible way to check the documentation before committing and pushing the commits. And running pkgdev yourself is a complete mess, not least due to it enforcing the use of an additional proxy, TLS woes, et cetera.

TheDiveO

未讀,
2022年6月27日 下午1:25:382022/6/27
收件者:golang-nuts
How do I make gopkg hot reload modules in local mode?
回覆所有人
回覆作者
轉寄
0 則新訊息