x/pkgsite: redirect to code files if possible #48172
Labels
FeatureRequest
Issues asking for a new feature that does not need a proposal.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
pkgsite
Milestone
What is the URL of the page with the issue?
golang.org/pkg/runtime/proc.go
golang.org/x/build/dashboard/builders.go
...
What is your user agent?
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36
Screenshot
What did you do?
Access the page
What did you expect to see?
golang.org was capable of redirect to a specific source code if the path indicates the source, and the file indeed exists.
Such as the above two pages should redirect to:
cs.opensource.google/go/go/+/master:src/runtime/proc.go
cs.opensource.google/go/x/build/+/master:dashboard/builders.go
pkgsite should also be compatible with this redirect.
To further generalize the need, as pkgsite already knows files that are contained in a package and the original repository URL, if the request router matches a contained file, then redirects to the corresponding source code, instead of showing 404 or request a new package.
What did you see instead?
404 or request a new package
The text was updated successfully, but these errors were encountered: