We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77f76ed commit 3d80b4eCopy full SHA for 3d80b4e
internal/godocfx/parse.go
@@ -461,7 +461,10 @@ func (l *linker) toURL(pkg, name string) string {
461
return fmt.Sprintf("#%s", name)
462
}
463
if mod, ok := l.sameDomainModules[pkg]; ok {
464
- pkgRemainder := pkg[len(mod.Path)+1:] // +1 to skip slash.
+ pkgRemainder := ""
465
+ if pkg != mod.Path {
466
+ pkgRemainder = pkg[len(mod.Path)+1:] // +1 to skip slash.
467
+ }
468
// Note: we always link to latest. One day, we'll link to mod.Version.
469
baseURL := fmt.Sprintf("/go/docs/reference/%v/latest/%v", mod.Path, pkgRemainder)
470
if anchor := l.idToAnchor[pkg][name]; anchor != "" {
0 commit comments