recovery

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recovery

func Recovery(opts ...Option) gin.HandlerFunc

Recovery resolve the panic in current context

Types

type Option

type Option func(options *Options)

func WithHandler

func WithHandler(handler func(ctx *gin.Context, logger *slog.Logger, err any)) Option

func WithLogger

func WithLogger(logger *slog.Logger) Option

type Options

type Options struct {
	Logger  *slog.Logger
	Handler func(ctx *gin.Context, logger *slog.Logger, err any)
}

Jump to

Keyboard shortcuts

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