Documentation
¶
Overview ¶
Package commonerrors defines typical errors which can happen.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotImplemented = errors.New("not implemented") ErrNoExtension = errors.New("missing extension") ErrNoLogger = errors.New("missing logger") ErrNoLoggerSource = errors.New("missing logger source") ErrNoLogSource = errors.New("missing log source") ErrUndefined = errors.New("undefined") ErrInvalidDestination = errors.New("invalid destination") ErrTimeout = errors.New("timeout") ErrLocked = errors.New("locked") ErrStaleLock = errors.New("stale lock") ErrExists = errors.New("already exists") ErrNotFound = errors.New("not found") ErrUnsupported = errors.New("unsupported") ErrWrongUser = errors.New("wrong user") ErrUnknown = errors.New("unknown") ErrInvalid = errors.New("invalid") ErrConflict = errors.New("conflict") ErrMarshalling = errors.New("unserialisable") ErrCancelled = errors.New("cancelled") ErrEmpty = errors.New("empty") ErrUnexpected = errors.New("unexpected") ErrTooLarge = errors.New("too large") ErrForbidden = errors.New("forbidden") ErrCondition = errors.New("failed condition") ErrEOF = errors.New("end of file") ErrMalicious = errors.New("suspected malicious intent") )
Functions ¶
func ConvertContextError ¶
ConvertContextError converts a context error into common errors.
func CorrespondTo ¶ added in v1.29.0
CorrespondTo determines whether a `target` error corresponds to a specific error described by `description` It will check whether the error contains the string in its description. It is not case-sensitive. ```code
CorrespondTo(errors.New("feature a is not supported", "not supported") = True ```
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.