WithPanicHandling will apply panic handler to regular http handler.
(handler http.Handler)
| 25 | |
| 26 | // WithPanicHandling will apply panic handler to regular http handler. |
| 27 | func WithPanicHandling(handler http.Handler) PanicHandler { |
| 28 | return PanicHandler{ |
| 29 | handler: handler, |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | // ServeHTTP serves http request for PanicHandler. |
| 34 | func (handler PanicHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request) { |
no outgoing calls
no test coverage detected