Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound indicates something was not found. ErrNotFound = errors.New("not found") // ErrInvalidParams represents the params are invalid, such as empty string. ErrInvalidParams = errors.New("invalid params") // ErrNotImplemented indicates unimplemented. ErrNotImplemented = errors.New("not implemented") )
Functions ¶
func As ¶
As looks up errors whose label is the same as the specific label and return a wrapped error.
func ErrInternalBy ¶
func Is ¶
Is looks up errors whose label is the same as the specific label and return true if it was found
func UnwrapErrInternal ¶ added in v0.3.0
Types ¶
type Error ¶
Error can hold an error together with label. This is useful for displaying a hierarchical error message cleanly and searching by label later to retrieve a wrapped error. Currently, Go standard error library does not support these use cases. That's why we need our own error type.
Click to show internal directories.
Click to hide internal directories.