godoc and 1.19 "Doc links"

539 views
Skip to first unread message

TheDiveO

unread,
Jun 25, 2022, 3:54:31 PM6/25/22
to 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

unread,
Jun 25, 2022, 4:22:47 PM6/25/22
to 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

unread,
Jun 25, 2022, 7:13:01 PM6/25/22
to 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

unread,
Jun 27, 2022, 1:25:38 PM6/27/22
to golang-nuts
How do I make gopkg hot reload modules in local mode?
Reply all
Reply to author
Forward
0 new messages