Documentation ¶
Overview ¶
Package middleware allows the use of http.HandlerFunc compatible funcs with julienschmidt/httprouter
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
func Handler(h http.Handler) httprouter.Handle
Handler accepts a handler to make it compatible with http.HandlerFunc Example: r.GET("/", httprouterwrapper.Handler(http.HandlerFunc(controller.Index)))
func HandlerFunc ¶
func HandlerFunc(h http.HandlerFunc) httprouter.Handle
HandlerFunc accepts the name of a function so you don't have to wrap it with http.HandlerFunc Example: r.GET("/", httprouterwrapper.HandlerFunc(controller.Index))
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.