calm

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package calm implements a middleware to recover from panic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Calm

type Calm struct {
	PrintStack bool
	Logger     *slog.Logger
}

Calm is a middleware to recover from panic.

func New

func New() *Calm

New creates a new Calm middleware.

func (*Calm) Handler

func (c *Calm) Handler(h http.Handler) http.Handler

Handler implements the middlewares.Middleware interface.

Jump to

Keyboard shortcuts

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