...

Package redirect

import "golang.org/x/tools/godoc/redirect"
Overview
Index

Overview ▾

Package redirect provides hooks to register HTTP handlers that redirect old godoc paths to their new equivalents.

func Handler

func Handler(target string) http.Handler

func PrefixHandler

func PrefixHandler(prefix, baseURL string) http.Handler

func Register

func Register(mux *http.ServeMux)

Register registers HTTP handlers that redirect old godoc paths to their new equivalents. If mux is nil it uses http.DefaultServeMux.