recover

package module
v0.0.0-...-6c9a70d Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2017 License: MIT Imports: 2 Imported by: 0

README

GoMiddleware : Recover

Middleware that recovers from panics, outputs the error to the log and writes a StatusCode of 500.

This middleware is inspired by the example given on Middlewares in Go: Best practices and examples by Nicolas Merouze.

As with ALL GoMiddleware we adhere to the standard form of Go's middleware, which means that it doesn't require any extra params over and above what is contained in the standard library. See the main website GoMiddleware for more details.

Synopsis



Other Recovery Middlewares

Within the GoMiddleware project, there are other 'recover' middlewares which may perform the more specific job you're looking for. This 'recover' middleware is very simple and just outputs any panic/error to the log, whereas other are more configurable.

License

MIT.

(Ends)

Documentation

Overview

Package recover provides a middleware handler that recovers from panics, outputs the error to the log, and writes a StatusCode of 500.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(next http.Handler) http.Handler

Handler returns a Recover middleware.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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