middleware

package
v0.0.0-...-0378f4a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Panic

type Panic struct {
	Next http.Handler
	// contains filtered or unexported fields
}

Panic recovers from API panics and logs encountered panics

func NewPanic

func NewPanic(next http.Handler, loggerFunc func(v ...interface{})) *Panic

func (*Panic) ServeHTTP

func (h *Panic) ServeHTTP(r http.ResponseWriter, req *http.Request)

It recovers from panics of all next handlers and logs them

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL