rescue

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package rescue recover()s and log panic()s.

It will also return an appropriate response to the client (HTML, JSON, or text).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Rescue

func Rescue(
	log func(*http.Request, error),
	dev bool,
) func(http.Handler) http.Handler

Rescue from panic()s in any of the lower middleware or HTTP handlers.

The extraFields callback can be used to add extra fields to the log (such as perhaps a installation ID or user ID from the session).

Types

This section is empty.

Jump to

Keyboard shortcuts

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