errors

package
v0.0.0-...-9648343 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	New  = errors.New
	Newf = fmt.Errorf
	Is   = errors.Is
	As   = errors.As
)

Import convenience

Functions

func Wrap

func Wrap(prefix string, err error) error

Wrap an error, if it is set, with a prefix message formatted in a common manner.

Types

type WrappedError

type WrappedError struct {
	Prefix string
	Err    error
}

A WrappedError is an error wrapped with an extra message.

func (WrappedError) Error

func (e WrappedError) Error() string

func (WrappedError) Unwrap

func (e WrappedError) Unwrap() error

Jump to

Keyboard shortcuts

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