Reported by @mvdan in slack: while the doc comment spec allows for qualified doc links such as [net/http.Request]
, it looks like the support for these links added in golang/go#64648 does not implement this support.
I've run into this as well; we should add this support.
Comment From: gabyhelp
Related Issues and Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Comment From: findleyr
Closing as a dupe of #61677.
Comment From: findleyr
Err, it's not an exact dupe, so I'll track this work separately.
Comment From: mvdan
I ran into this again today. I'd be happy to assist in testing or code review when a fix does come up.
FWIW I see similar issues with e.g. [error]
or [error.Error]
, which do not work as links for https://pkg.go.dev/builtin#error. The builtin package is a bit special and perhaps needs extra code to be handled correctly.
Comment From: findleyr
Why this is harder than expected: currently, we use type-checking information to resolve the link, and we might not have a type-checked package for the prefix in question.
We should probably use symbol information, either from the workspace symbols index or module cache index. Workspace symbols is best.