// Register HTTP handlers that redirect old blog paths to their new locations. package main import "net/http" func init() { for src, dst := range urlMap { http.HandleFunc(src, func(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, dst, http.StatusPermanentRedirect) }) } } var urlMap = map[string]string{ "/whoami": "/Who-am-I", "/tek": "/teapot", }