x/pkgsite: suggest canonical module/package path when visiting repository path #43518
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
pkgsite
Milestone
I was recently browsing https://github.com/rsc/rf and wanted to see its godoc so I naively visited https://pkg.go.dev/github.com/rsc/rf. This presented me with the
Oops! We couldn't find “github.com/rsc/rf”.
page which confused me.Then I realized it may have a different canonical module path, so I checked go.mod and indeed it's at rsc.io/rf. Visiting https://pkg.go.dev/rsc.io/rf then worked as expected.
It would be nice if pkgsite suggested visiting https://pkg.go.dev/rsc.io/rf to me when visiting https://pkg.go.dev/github.com/rsc/rf. It seems to already know that rsc.io/rf comes from github.com/rsc/rf as part of linking github.com/rsc/rf under "Repository" at https://pkg.go.dev/rsc.io/rf.
This would also align with what happens when trying to
go get github.com/rsc/rf
in an existing module, which does suggest the canonical path:The text was updated successfully, but these errors were encountered: