Documentation ¶
Overview ¶
Package panic defiens a panic handler that deals with panics occuring during the handling of a http request. It is in general route-agnostic.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { Handle func(msg interface{}, w http.ResponseWriter, r *http.Request) // contains filtered or unexported fields }
Handler allows for the registration of a panic handling function.
func NewHandler ¶
func NewHandler(handler func(msg interface{}, w http.ResponseWriter, r *http.Request)) Handler
NewHandler return an object used to take care of panics stemming from the request handling process accomodated by a downstrean chain of registered request handlers.
Click to show internal directories.
Click to hide internal directories.