Documentation ¶
Index ¶
- func Contains(err error, substr string) bool
- func Errorf(format string, a ...interface{}) error
- func FormatError(s fmt.State, verb rune, err error)
- func HasPrefix(err error, prefix string) bool
- func HasSuffix(err error, suffix string) bool
- func IsRetryable(err error) bool
- func NewErrorf(opts ...ErrorfOption) func(format string, a ...interface{}) error
- func WithRetryable(err error, retryable bool) error
- type ErrorfOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatError ¶ added in v0.0.57
FormatError is intended to be used as follows:
func (e *customError) Format(s fmt.State, verb rune) { errorz.FormatError(s, verb, e.Unwrap()) }
func IsRetryable ¶ added in v0.0.57
func NewErrorf ¶ added in v0.0.57
func NewErrorf(opts ...ErrorfOption) func(format string, a ...interface{}) error
NewErrorf returns a function like xerrors.Errorf. It is possible to return a function with different behaviors by passing ErrorfOption as arguments.
func WithRetryable ¶ added in v0.0.57
Types ¶
type ErrorfOption ¶ added in v0.0.57
type ErrorfOption interface {
// contains filtered or unexported methods
}
func WithCallerSkip ¶ added in v0.0.57
func WithCallerSkip(callerSkip int) ErrorfOption
WithCallerSkip returns an ErrorfOption that sets the number of stack frames to skip.
Click to show internal directories.
Click to hide internal directories.