varserr

package
v0.0.0-...-b3a3e34 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogVarsErr

func LogVarsErr(vErr VarsErr, logger *slog.Logger)

func NewVarsErr

func NewVarsErr(err string, vars map[string]any) errorsx.CustomErr[VarsErrInfo]

Types

type VarsErr

type VarsErr errorsx.CustomErr[VarsErrInfo]

VarsErr is a type of error that allows to put a map of any states (variables) as an additional info to your errors. That can be useful for structured logging.

This package provides LogVarsErr function that allows to easily log that type of errors using slog

type VarsErrInfo

type VarsErrInfo map[string]any

Jump to

Keyboard shortcuts

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