Versions in this module Expand all Collapse all v1 v1.0.0 Jan 17, 2023 Changes in this version + func CleanPath(p string) string + type Handle func(ctx context.Context, reqPath string, p Params, rw W) (bool, error) + type Param struct + Key string + Value string + type Params []Param + func (ps Params) ByName(name string) string + type Router struct + func New() *Router[W] + func NewWithConfig(conf RouterConfig[W]) *Router[W] + func (r *Router[W]) AddHandler(path string, handle Handle[W]) + func (r *Router[W]) LookupPath(path string) (Handle[W], Params, bool) + func (r *Router[W]) Serve(ctx context.Context, reqPath string, wr W) (bool, error) + type RouterConfig struct + NotFound Handle[W] + PanicHandler func(ctx context.Context, reqPath string, rw W, panicErr interface{}) + RedirectFixedPath bool + RedirectTrailingSlash bool + func DefaultConfig() RouterConfig[W]