doc: don't redirect vanity packages to GitHub
This change fixes a regression from CL 120059. We started to redirect
to GitHub's reported canonical case when the request path didn't
match too aggressively. It should only be done if the request path is
already on GitHub; otherwise we're redirecting a vanity import path to
its GitHub hosting location whenever it doesn't have an import path
Add tests for this newPackage redirection behavior to increase
confidence in the fix, and help avoid future regressions.
Fix typos in gosrc package comments.
Reviewed-by: Tuo Shan <email@example.com>
4 files changed