recover

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(mw ...wish.Middleware) wish.Middleware

Middleware is a wish middleware that recovers from panics and log to stderr.

func MiddlewareWithLogger

func MiddlewareWithLogger(logger Logger, mw ...wish.Middleware) wish.Middleware

MiddlewareWithLogger is a wish middleware that recovers from panics and log to the provided logger.

Types

type Logger added in v1.1.0

type Logger interface {
	Printf(format string, v ...interface{})
}

Logger is the interface that wraps the basic Log method.

Jump to

Keyboard shortcuts

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