errors

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errorf

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

Errorf creates a new error using fmt.Sprintf().

func Is

func Is(err, target error) bool

Is mirrors the stdlib errors.Is function.

func New

func New(message string) error

New creates a new error.

func Unwrap

func Unwrap(err error) error

Unwrap aliases the stdlib errors.Unwrap function.

func WithStack

func WithStack(err error) error

WithStack chains source location information to an error if "err" is not nil.

func Wrap

func Wrap(err error, message string) error

Wrap chains a new error to "err" if it is not nil.

func Wrapf

func Wrapf(err error, format string, args ...interface{}) error

Wrapf chains a new fmt.Sprintf() formatted error to "err" if "err" is not nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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