Documentation
¶
Index ¶
- Constants
- func Is(err1 error, err2 error) bool
- func IsWithStrategy(err1 error, err2 error, comparable Comparable) bool
- func Stack(source error, targets ...error) (result error)
- type Code
- type Comparable
- type Error
- type Errors
- func (e *Errors) Error() string
- func (e *Errors) First() Error
- func (e *Errors) Is(err error) bool
- func (e *Errors) IsWithStrategy(err error, comparable Comparable) bool
- func (e *Errors) Last() Error
- func (e *Errors) MarshalJSON() ([]byte, error)
- func (e *Errors) Stack(target error) error
- func (e *Errors) UnmarshalJSON(b []byte) error
- type Message
Constants ¶
View Source
const ( CodeSubject = "subject" CodeInvalid = "invalid" CodeUnknown = "unknown" )
Variables ¶
This section is empty.
Functions ¶
func IsWithStrategy ¶ added in v0.2.0
func IsWithStrategy(err1 error, err2 error, comparable Comparable) bool
Types ¶
type Comparable ¶
func CompareCodeOnlyStrategy ¶
func CompareCodeOnlyStrategy() Comparable
func CompareMessageOnlyStrategy ¶
func CompareMessageOnlyStrategy() Comparable
func CompareStrictStrategy ¶
func CompareStrictStrategy() Comparable
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
func (Error) MarshalJSON ¶
func (*Error) UnmarshalJSON ¶ added in v0.6.0
type Errors ¶
type Errors struct {
// contains filtered or unexported fields
}
func (*Errors) IsWithStrategy ¶
func (e *Errors) IsWithStrategy(err error, comparable Comparable) bool
func (*Errors) MarshalJSON ¶
func (*Errors) UnmarshalJSON ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.