package
1.1.3
Repository: https://github.com/ibrt/golang-errors.git
Documentation: pkg.go.dev

# Functions

A is a shorthand builder for args.
Assertf is like MustErrorf if cond is false, does nothing otherwise.
Errorf formats a new error and wraps it.
FormatStackTrace formats the given raw stack trace.
GetCallers returns the raw stack trace from the error, or the current raw stack trace if not found.
GetID gets the id from the error, or an empty id if not set.
GetMetadata gets the metadata from the error, nil if not found.
GetStatus gets the status code from the error, or 0 if not set.
IgnoreClose calls Close on the given io.Closer, ignoring the returned error.
M is a shorthand for providing metadata to errors.
MaybeMustWrap is like MustWrap, but does nothing if called with a nil error.
MaybeWrap is like Wrap, but returns nil if called with a nil error.
MaybeWrapRecover is like WrapRecover but returns nil if called with a nil recover.
MustClose calls Close on the given io.Closer, panicking in case of error.
MustErrorf is like Errorf but panics instead of returning the error.
MustWrap is like Wrap, but panics if the given error is non-nil.
Prefix adds a prefix to the error message.
Safe calls the function catching any panic and returning it as error.
Skip skips the caller from the stack trace.
SkipAll skips the caller and any lower frames from the stack trace.
SkipPackage skips all frames from the caller package from the stack trace.
ToSummary converts an error to Summary.
Unwrap undoes Wrap, returning the original error.
Wrap wraps the given error, applying the given options.
WrapRecover takes a recovered interface{} and converts it to a wrapped error.

# Structs

Summary provides a serializable summary of an error and its metadata.

# Interfaces

Option describes an option which can be applied to an error.

# Type aliases

Args describes a list of args used for formatting an error message.
ID describes an error id.
Metadata describes metadata which can be attached to errors.
OptionFunc describes an option which can be applied to an error.
Status describes an HTTP status code.