Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Middleware ¶
func Middleware(handler ErrorHandler) medium.Middleware
Middleware accepts an ErrorHandler and returns a medium.Middleware that will rescue errors that happen in middlewares that are called after it.
Types ¶
type ErrorHandler ¶
type ErrorHandler func(http.ResponseWriter, *http.Request, error)
An ErrorHandler is a function that is called when an error occurs.
Click to show internal directories.
Click to hide internal directories.