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.
Internal call graph ▹
Internal call graph ▾
In the call graph viewer below, each node is a function belonging to this package and its children are the functions it calls—perhaps dynamically.
The root nodes are the entry points of the package: functions that may be called from outside the package. There may be non-exported or anonymous functions among them if they are called dynamically from another package.
Click a node to visit that function's source code.
From there you can visit its callers by
clicking its declaring
Functions may be omitted if they were determined to be unreachable in the particular programs or tests that were analyzed.
func Handler(target string) http.Handler
func LoadChangeMap ¶
func LoadChangeMap(filename string) error
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 PrefixHandler(prefix, baseURL string) http.Handler
func Register(mux *http.ServeMux)
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.