package redirect
import "golang.org/x/tools/godoc/redirect"
Package redirect provides hooks to register HTTP handlers that redirect old godoc paths to their new equivalents and assist in accessing the issue tracker, wiki, code review system, etc.
Index ¶
- func Handler(target string) http.Handler
- func LoadChangeMap(filename string) error
- func PrefixHandler(prefix, baseURL string) http.Handler
- func Register(mux *http.ServeMux)
Functions ¶
func Handler ¶
func LoadChangeMap ¶
LoadChangeMap loads the specified map of Mercurial to Git revisions, which is used by the /change/ handler to intelligently map old hg revisions to their new git equivalents. It should be called before calling Register. The file should remain open as long as the process is running. See the implementation of this package for details.
func PrefixHandler ¶
func Register ¶
Register registers HTTP handlers that redirect old godoc paths to their new equivalents and assist in accessing the issue tracker, wiki, code review system, etc. If mux is nil it uses http.DefaultServeMux.
Source Files ¶
hash.go redirect.go rietveld.go
- Version
- v0.1.4
- Published
- Jun 23, 2021
- Platform
- darwin/amd64
- Imports
- 14 packages
- Last checked
- 11 hours ago –
Tools for package owners.