# 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 MultiError 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
ChainError is a linked list of error pointers that point to a parent above and a child below.
MultiError wraps multiple errors into one error string.
# Type aliases
ErrorChain is type cast to ChainError for backwards compatibility This will be deprecated in future major release.
MatcherFunc is used to match errors.
MultiErr type cast MultiError for backward compatibility This will be deprecated in future major release.