errors

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errorf

func Errorf(format string, a ...interface{}) error

func Is

func Is(err, target error) bool

Is reports whether any error in err chain matches target.

func New

func New(msg string) error

New creates a new instance of the base error.

func NewWithFrameSkip

func NewWithFrameSkip(msg string, skipFrames int) error

NewWithFrameSkip creates a new instance of the base error and allow the user to configure skipFrames. useful when working with error helper functions.

func UnWrapRecursivelyUntil

func UnWrapRecursivelyUntil(err error, asserter func(unWrapped error) bool) error

func Wrap

func Wrap(err error, msg string) error

Wrap creates a new error by wrapping an existing error.

func WrapWithFrameSkip

func WrapWithFrameSkip(err error, msg string, skipFrames int) error

WrapWithFrameSkip creates a new error by wrapping an existing error.

func Wrapf

func Wrapf(err error, msg string, a ...interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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