package
0.2.0
Repository: https://github.com/pasataleo/go-errors.git
Documentation: pkg.go.dev

# Functions

Append appends the given errors to the current error.
Embed returns a new error with the supplied data embedded in the provided error.
Expand will expand the provider error into multiple errors if it is a multi error.
GetAllEmbeddedData returns all embedded data from an error if it exists.
GetEmbeddedData returns the embedded data from an error if it exists.
GetEmbeddedDataUnsafe returns the embedded data from an error if it exists.
GetErrorCode returns the error code of the given error.
Is validates the error has the supplied error code.
New returns an error with a new error code, optionally wrapping an existing error.
Newf returns an error with a new error code, optionally wrapping an existing error.
Unwrap returns the unwrapped error if it exists.
Wrap returns an error wrapping an existing error.
Wrapf returns an error wrapping an existing error.

# Constants

ErrorCodeMulti is the error code returned when an error contains multiple errors.
ErrorCodeOk is the error code returned when an error is nil.
ErrorCodeUnknown is the default error code returned when an error hasn't been assigned a code.
ErrorCodeWrapped is the error code returned when an error is wrapped by another error.

# Structs

DataContainingError is an extension to the WrappingError struct that contains embedded data.
WrappingError is an error that can wrap another error.

# Interfaces

Codeable is an interface that can be implemented by errors that have an error code.
DataContainer is an interface for errors that contain embedded data.
Unwrappable is an interface for errors that can be unwrapped.

# Type aliases

ErrorCode represents a code that can be used to identify the type of error.