recover

package
v0.0.0-...-6e3aa5c Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: MIT Imports: 4 Imported by: 0

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

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