Documentation ¶
Overview ¶
Package panichandler provides An HTTP decorator which recovers from `panic`
Index ¶
Constants ¶
View Source
const LogFormat = `` /* 294-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func DefaultRecoveryHandler ¶
func DefaultRecoveryHandler(rw http.ResponseWriter, r *http.Request, panicErr interface{})
Types ¶
type PanicHandler ¶
type PanicHandler struct {
// contains filtered or unexported fields
}
func Decorate ¶
func Decorate(recovery RecoveryHandlerFunc, logger *log.Logger, delegate http.Handler) *PanicHandler
func (PanicHandler) ServeHTTP ¶
func (lh PanicHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type RecoveryHandlerFunc ¶
type RecoveryHandlerFunc func(http.ResponseWriter, *http.Request, interface{})
Click to show internal directories.
Click to hide internal directories.