Versions in this module Expand all Collapse all v1 v1.0.9 Apr 20, 2018 Changes in this version + var SkipRouter = errors.New("skip this router") + func Vars(r *http.Request) map[string]string + type BuildVarsFunc func(map[string]string) map[string]string + type MatcherFunc func(*http.Request, *RouteMatch) bool + func (m MatcherFunc) Match(r *http.Request, match *RouteMatch) bool + type Route struct + func CurrentRoute(r *http.Request) *Route + func (r *Route) BuildOnly() *Route + func (r *Route) BuildVarsFunc(f BuildVarsFunc) *Route + func (r *Route) GetError() error + func (r *Route) GetHandler() http.Handler + func (r *Route) GetHostTemplate() (string, error) + func (r *Route) GetName() string + func (r *Route) GetPathTemplate() (string, error) + func (r *Route) Handler(handler http.Handler) *Route + func (r *Route) HandlerFunc(f func(http.ResponseWriter, *http.Request)) *Route + func (r *Route) Headers(pairs ...string) *Route + func (r *Route) HeadersRegexp(pairs ...string) *Route + func (r *Route) Host(tpl string) *Route + func (r *Route) Match(req *http.Request, match *RouteMatch) bool + func (r *Route) MatcherFunc(f MatcherFunc) *Route + func (r *Route) Methods(methods ...string) *Route + func (r *Route) Name(name string) *Route + func (r *Route) Path(tpl string) *Route + func (r *Route) PathPrefix(tpl string) *Route + func (r *Route) Queries(pairs ...string) *Route + func (r *Route) Schemes(schemes ...string) *Route + func (r *Route) SkipClean() bool + func (r *Route) Subrouter() *Router + func (r *Route) URL(pairs ...string) (*url.URL, error) + func (r *Route) URLHost(pairs ...string) (*url.URL, error) + func (r *Route) URLPath(pairs ...string) (*url.URL, error) + type RouteMatch struct + Handler http.Handler + Route *Route + Vars map[string]string + type Router struct + KeepContext bool + NotFoundHandler http.Handler + func NewRouter() *Router + func (r *Router) BuildVarsFunc(f BuildVarsFunc) *Route + func (r *Router) Get(name string) *Route + func (r *Router) GetRoute(name string) *Route + func (r *Router) Handle(path string, handler http.Handler) *Route + func (r *Router) HandleFunc(path string, f func(http.ResponseWriter, *http.Request)) *Route + func (r *Router) Headers(pairs ...string) *Route + func (r *Router) Host(tpl string) *Route + func (r *Router) Match(req *http.Request, match *RouteMatch) bool + func (r *Router) MatcherFunc(f MatcherFunc) *Route + func (r *Router) Methods(methods ...string) *Route + func (r *Router) NewRoute() *Route + func (r *Router) Path(tpl string) *Route + func (r *Router) PathPrefix(tpl string) *Route + func (r *Router) Queries(pairs ...string) *Route + func (r *Router) Schemes(schemes ...string) *Route + func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) + func (r *Router) SkipClean(value bool) *Router + func (r *Router) StrictSlash(value bool) *Router + func (r *Router) UseEncodedPath() *Router + func (r *Router) Walk(walkFn WalkFunc) error + type WalkFunc func(route *Route, router *Router, ancestors []*Route) error