router

package
v1.0.12-0...-16f252f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidMethod = errors.New("not a valid http method")
	ErrInvalidPath   = errors.New("path must begin with '/'")
)

Functions

func NewPatRouter

func NewPatRouter() httpx.Router

Types

type PatRouter

type PatRouter struct {
	// contains filtered or unexported fields
}

func (*PatRouter) Handle

func (pr *PatRouter) Handle(method, reqPath string, handler http.Handler) error

func (*PatRouter) ServeHTTP

func (pr *PatRouter) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*PatRouter) SetNotFoundHandler

func (pr *PatRouter) SetNotFoundHandler(handler http.Handler)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL