Versions in this module Expand all Collapse all v0 v0.8.0 Sep 11, 2021 Changes in this version + func Clean(p string) string + func JSON(w http.ResponseWriter, value interface{}) error + func Version() string + type CompatGroup struct + func (g CompatGroup) DELETE(path string, handler http.HandlerFunc) + func (g CompatGroup) GET(path string, handler http.HandlerFunc) + func (g CompatGroup) HEAD(path string, handler http.HandlerFunc) + func (g CompatGroup) Handle(method string, path string, handler http.HandlerFunc) + func (g CompatGroup) NewGroup(path string, opts ...GroupOption) *CompatGroup + func (g CompatGroup) OPTIONS(path string, handler http.HandlerFunc) + func (g CompatGroup) PATCH(path string, handler http.HandlerFunc) + func (g CompatGroup) POST(path string, handler http.HandlerFunc) + func (g CompatGroup) PUT(path string, handler http.HandlerFunc) + func (g CompatGroup) WithGroup(path string, fn func(g *CompatGroup)) + func (g CompatGroup) WithMiddleware(middleware MiddlewareFunc) *CompatGroup + type CompatRouter struct + type Group struct + func (g *Group) Compat() *CompatGroup + func (g *Group) DELETE(path string, handler HandlerFunc) + func (g *Group) GET(path string, handler HandlerFunc) + func (g *Group) HEAD(path string, handler HandlerFunc) + func (g *Group) Handle(method string, path string, handler HandlerFunc) + func (g *Group) NewGroup(path string, opts ...GroupOption) *Group + func (g *Group) OPTIONS(path string, handler HandlerFunc) + func (g *Group) PATCH(path string, handler HandlerFunc) + func (g *Group) POST(path string, handler HandlerFunc) + func (g *Group) PUT(path string, handler HandlerFunc) + func (g *Group) WithGroup(path string, fn func(g *Group)) + func (g *Group) WithMiddleware(middleware MiddlewareFunc) *Group + type GroupOption interface + func WithGroup(fn func(g *Group)) GroupOption + func WithHandler(fn HandlerFunc) GroupOption + func WithMiddleware(fn MiddlewareFunc) GroupOption + type H map[string]interface + type HandlerFunc func(http.ResponseWriter, Request) error + func HTTPHandler(handler http.Handler) HandlerFunc + func HTTPHandlerFunc(handler http.HandlerFunc) HandlerFunc + type MiddlewareFunc func(next HandlerFunc) HandlerFunc + type Option interface + func UseURLPath() Option + func WithHeadCanUseGet(on bool) Option + func WithMethodNotAllowedHandler(handler HandlerFunc) Option + func WithNotFoundHandler(handler HandlerFunc) Option + func WithRedirectBehavior(value RedirectBehavior) Option + func WithRedirectCleanPath(on bool) Option + func WithRedirectMethodBehavior(value map[string]RedirectBehavior) Option + func WithRedirectTrailingSlash(on bool) Option + func WithRemoveCatchAllTrailingSlash(on bool) Option + type Param struct + Name string + Value string + type Params []Param + func (ps Params) Get(name string) (string, bool) + func (ps Params) Int32(name string) (int32, error) + func (ps Params) Int64(name string) (int64, error) + func (ps Params) Map() map[string]string + func (ps Params) Text(name string) string + func (ps Params) Uint32(name string) (uint32, error) + func (ps Params) Uint64(name string) (uint64, error) + type RedirectBehavior int + const Redirect301 + const Redirect307 + const Redirect308 + const UseHandler + type Request struct + func NewRequest(req *http.Request) Request + func (req Request) Context() context.Context + func (req Request) Param(key string) string + func (req Request) Params() Params + func (req Request) Route() string + func (req Request) WithContext(ctx context.Context) Request + func (req Request) WithParams(params Params) Request + type RouteInfo struct + func RouteFromContext(ctx context.Context) *RouteInfo + func (r *RouteInfo) Name() string + func (r *RouteInfo) Param(name string) string + func (r *RouteInfo) Params() Params + type Router struct + func New(opts ...Option) *Router + func (r *Router) Compat() *CompatRouter + func (t *Router) Dump() string + func (t *Router) ServeHTTP(w http.ResponseWriter, req *http.Request)