Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ParamsKey paramsKey = paramsKey{}
ParamsKey is used as a key for Params in a request's Context.
Functions ¶
Types ¶
type Router ¶
type Router struct { NotFoundHandler http.HandlerFunc // contains filtered or unexported fields }
func (*Router) Handler ¶
func (rr *Router) Handler(method, pattern string, handler http.HandlerFunc) error
Handler registers a handler for provided pattern for a given HTTP method. Pattern must start with a slash (/) symbol.
func (*Router) ServeStatic ¶
func (rr *Router) ServeStatic(path string, root http.FileSystem) error
ServeStatic serves a given file system.
Path should end with /*filepath to work.
Click to show internal directories.
Click to hide internal directories.