package
1.2.3
Repository: https://github.com/tooolbox/errors.git
Documentation: pkg.go.dev

# Functions

DecodeError decodes an error.
EncodeError encodes an error.
FormatError formats an error according to s and verb.
GetAllSafeDetails collects the safe details from the given error object and all its causes.
GetSafeDetails collects the safe details from the given error object.
GetTypeKey retrieve the type key for a given error object.
GetTypeMark retrieves the ErrorTypeMark for a given error object.
RegisterLeafDecoder can be used to register new leaf error types to the library.
RegisterLeafEncoder can be used to register new leaf error types to the library.
RegisterTypeMigration tells the library that the type of the error given as 3rd argument was previously known with type previousTypeName, located at previousPkgPath.
RegisterWrapperDecoder can be used to register new wrapper types to the library.
RegisterWrapperEncoder can be used to register new wrapper types to the library.
SetWarningFn enables configuration of the warning function.
TestingWithEmptyMigrationRegistry is intended for use by tests.
UnwrapAll accesses the root cause object of the error.
UnwrapOnce accesses the direct cause of the error if any, otherwise returns nil.

# Structs

SafeDetailPayload captures the safe strings for one level of wrapping.

# Interfaces

A Formatter formats error messages.
A Printer formats error messages.
SafeDetailer is an interface that can be implemented by errors that can provide PII-free additional strings suitable for reporting or telemetry.
TypeKeyMarker can be implemented by errors that wish to extend their type name as seen by GetTypeKey().

# Type aliases

EncodedError is the type of an encoded (and protobuf-encodable) error.
LeafDecoder is to be provided (via RegisterLeafDecoder above) by additional wrapper types not yet known to this library.
LeafEncoder is to be provided (via RegisterLeafEncoder above) by additional wrapper types not yet known to this library.
TypeKey identifies an error for the purpose of looking up decoders.
WrapperDecoder is to be provided (via RegisterWrapperDecoder above) by additional wrapper types not yet known to this library.
WrapperEncoder is to be provided (via RegisterWrapperEncoder above) by additional wrapper types not yet known to this library.