package
2.5.1+incompatible
Repository: https://github.com/signalfx/golib.git
Documentation: pkg.go.dev

# Functions

Annotate adds a new error in the chain that is some extra context about the error.
Annotatef adds a new formatf error in the chain that is some extra context about the error.
Cause of the original error at the end of the chain.
DeferLogIfErr will log to l a Printf message if the return value of errCallback is not nil.
Details are an easy to read concat of all the error strings in a chain.
Errorf is fmt.Errorf.
LogIfErr will log to l a Printf message if err is not nil.
Matches is used to wrap the Cause() and is similar to something like: f, err := do_something() if Matches(err, os.IsTimeout) { // It was a timeout error somewhere..
MatchesI is like Matches but takes the interface, if you need it.
Message is the error string at the Head of the linked list.
New error.
NewMultiErr will return nil if there are no valid errors in errs, will return the exact, single error if errs only contains a single error, and will otherwise return an instance of MultiErr that wraps all the errors at once.
Next error just below this one, or nil if there is no next error.
PanicIfErr is useful if writing shell scripts.
PanicIfErrWrite is similar to PanicIfErr, but works well with io results that return integer+err.
Tail of the error chain: at the end.
Wrap a head function giving it the chain defined in next.

# Structs

ErrorChain is a linked list of error pointers that point to a parent above and a child below.
MultiErr wraps multiple errors into one error string.

# Interfaces

Loggable is anything the error loggers can print to.
A Matcher detects if errors match some condition.

# Type aliases

MatcherFunc is used to match errors.