x/pkgsite: redirect to code files if possible #48172
What is the URL of the page with the issue?
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
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:
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: