Documentation ¶
Overview ¶
Package method provide method based routing
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Must ¶
func Must(methods ...string) func(http.HandlerFunc) http.HandlerFunc
Must return middleware that only allowed method that specified in methods
Types ¶
type H ¶
type H map[string]http.HandlerFunc
H is type for mapping method and its handler
func (H) Compile ¶
func (h H) Compile(def http.HandlerFunc) http.HandlerFunc
Compile into single http.HandlerFunc. if def is nil, default handler is defhandler.StatusMethodNotAllowed
Click to show internal directories.
Click to hide internal directories.