errors

package
v10.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2022 License: MIT Imports: 3 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Is = errors.Is
	As = errors.As
)

Functions

func New

func New(msg string) error

func WithDetails

func WithDetails(err error, data ...interface{}) error

func Wrap

func Wrap(err error, msg string, data ...interface{}) error

Types

type Error

type Error interface {
	Error() string
	Unwrap() error
	Msg() string
	Data() []interface{}
}

Error is our custom error type that allows wrapping errors with additional data. It should be go 1.13 compatible, implementing Unwrap (formerly Cause)

Jump to

Keyboard shortcuts

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