// Register registers HTTP handlers that redirect old godoc paths to their new equivalents. // If mux is nil it uses http.DefaultServeMux. func Register(mux *http.ServeMux) { … } func Handler(target string) http.Handler { … } var validID … func PrefixHandler(prefix, baseURL string) http.Handler { … } // Redirect requests from the old "/src/pkg/foo" to the new "/src/foo". // See http://golang.org/s/go14nopkg func srcPkgHandler(w http.ResponseWriter, r *http.Request) { … }