Package whroute provides utilities to implement route listing, whereby http.Handlers that opt in can list what routes they understand.
const ( // AllMethods should be returned from a whroute.Lister when all methods are // successfully handled. AllMethods = "ALL" // AllPaths should be returned from a whroute.Lister when all paths are // successfully handled. AllPaths = "[/<*>]" )
HandlerFunc advertises the routes from routes, but serves content using fn.
PrintRoutes will write all routes of h to out, using the Routes method.
Routes will call cb with all routes known to h.
Lister is an interface handlers can implement if they want the Routes method to work. All http.Handlers in the webhelp package implement Routes.