Documentation ¶
Index ¶
- func Append(err0 error, errs ...error) error
- func AppendTo(pErr *error, errs ...error)
- func AppendTof(pErr *error, err error, msg string, args ...any)
- func Appendf(err0 error, err error, msg string, args ...any) error
- func Combine(errs ...error) (err error)
- func Error(msg string) error
- func Errorf(format string, args ...any) error
- func GetErrors(err error) []error
- func MapFunc[T, Q any](fn func(T) Q) func(v T, err error) (Q, error)
- func Must[T any](v T, err error) T
- func Must2[A, B any](a A, b B, err error) (A, B)
- func Must3[A, B, C any](a A, b B, c C, err error) (A, B, C)
- func Must4[A, B, C, D any](a A, b B, c C, d D, err error) (A, B, C, D)
- func Must5[A, B, C, D, E any](a A, b B, c C, d D, e E, err error) (A, B, C, D, E)
- func Must6[A, B, C, D, E, F any](a A, b B, c C, d D, e E, f F, err error) (A, B, C, D, E, F)
- func Must7[A, B, C, D, E, F, G any](a A, b B, c C, d D, e E, f F, g G, err error) (A, B, C, D, E, F, G)
- func Must8[A, B, C, D, E, F, G, H any](a A, b B, c C, d D, e E, f F, g G, h H, err error) (A, B, C, D, E, F, G, H)
- func MustValidate(condition bool, msgArgs ...any)
- func MustValidateX[T any](value T, condition bool, msgArgs ...any) T
- func MustValidateXf[T any](value T, condition bool, msg string, args ...any) T
- func MustValidatef(condition bool, msg string, args ...any)
- func MustZ(err error)
- func New(msg string) error
- func Newf(format string, args ...any) error
- func Validate(condition bool, msgArgs ...any) error
- func ValidateTo(pErr *error, condition bool, msgArgs ...any)
- func ValidateToX[T any](pErr *error, value T, condition bool, msgArgs ...any) (out T)
- func ValidateToXf[T any](pErr *error, value T, condition bool, msg string, args ...any) (out T)
- func ValidateTof(pErr *error, condition bool, msg string, args ...any)
- func ValidateX[T any](value T, condition bool, msgArgs ...any) (T, error)
- func ValidateXf[T any](value T, condition bool, msgArgs ...any) (T, error)
- func Validatef(condition bool, msg string, args ...any) error
- func Wrap(err error, msg string) error
- func Wrapf(err error, format string, args ...any) error
- type Errors
- type Option
- func (opt Option) AddSkip(n int) Option
- func (opt Option) Append(pErr *error, errs ...error)
- func (opt Option) AppendTo(pErr *error, errs ...error)
- func (opt Option) AppendTof(pErr *error, err error, msgArgs ...any)
- func (opt Option) Appendf(pErr *error, err error, msgArgs ...any)
- func (opt Option) Error(msg string) error
- func (opt Option) Errorf(format string, args ...any) error
- func (opt Option) New(msg string) error
- func (opt Option) Newf(format string, args ...any) error
- func (opt Option) Validate(condition bool, msgArgs ...any) error
- func (opt Option) Validatef(condition bool, msg string, args ...any) error
- func (opt Option) Wrap(err error, msg string) error
- func (opt Option) Wrapf(err error, format string, args ...any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapFunc ¶ added in v0.1.0
MapFunc maps a value and an error to another value and error using the input function.
func MustValidate ¶ added in v0.0.8
func MustValidateX ¶ added in v0.0.8
func MustValidateXf ¶ added in v0.0.8
func MustValidatef ¶ added in v0.0.8
func ValidateTo ¶ added in v0.0.8
func ValidateToX ¶ added in v0.0.8
func ValidateToXf ¶ added in v0.0.8
func ValidateTof ¶ added in v0.0.8
func ValidateXf ¶ added in v0.0.8
Types ¶
type Errors ¶
type Errors interface { error Errors() []error Unwrap() []error stacktracez.StackTracerZ }
Click to show internal directories.
Click to hide internal directories.