Граф коммитов

2 Коммитов

Автор SHA1 Сообщение Дата
Gary Burd ff26967b09 Implement package redirects.
Add feature to redirect page requests for a non-canonical package path
to the canonical package path. This feature covers the following
scenarios:

- Non-canonical case used in GitHub user and repository names.
- Package import comments as described at http://goo.gl/MBL1n6.
- New Go sub-repository names as described at http://goo.gl/wPoqC5.

Packages at non-canonical paths are deleted from the database the next
time they are crawled.

Specific changes to the code are:

- Code in gddd-server/main.go used pdoc == nil to indicate that a
  package was not found. Update the code to use gosrc.NotFoundError to
  indicate that the package was not found.
- Add Redirect field to gosrc.NotFoundError. This field specifies the
  canonical path for a package if known.
- Update the code to set the gosrc.NotFoundError Redirect field as
  appropriate.
- Update the document page and refresh to redirect as appropriate. The
  API does not redirect.
- Update the sub-repo page (http://godoc.org/-/subrepo) and supporting
  indexing code for the new Go sub-repository names.

The package import comment feature is commented out because the feature
depends on Go 1.4.
2014-11-06 16:12:58 -08:00
Gary Burd 5401ad28ee First commit. 2014-02-12 21:02:27 -08:00