recovery

package module
v0.0.0-...-cd36075 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2015 License: MIT Imports: 5 Imported by: 0

README

recovery

Gohttp recovery middleware

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config Config) func(http.Handler) http.Handler

New returns middleware that recovers from panics, logs the panic (and a backtrace), and returns a HTTP 500 (Internal Server Error) status if possible.

Prints a request ID if one is provided.

Types

type Config

type Config struct {
	Log func(string)
}

Config for recovery middleware

Jump to

Keyboard shortcuts

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