-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
23 lines (19 loc) · 1 KB
/
Copy patherrors.go
File metadata and controls
23 lines (19 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package comparator
import "errors"
// Sentinel errors returned by the package. Use errors.Is to branch on them.
var (
// ErrUnknownFormat is returned by FormatDiff when the requested format is
// not a built-in format ("text", "json", "markdown", "html") and no
// formatter has been registered for it with RegisterFormatter.
ErrUnknownFormat = errors.New("comparator: unknown output format")
// ErrCanceled is returned by the context-aware comparison functions and
// methods when the provided context is canceled or its deadline is exceeded
// before the comparison completes. It wraps the context's own error, so
// errors.Is(err, context.Canceled) and errors.Is(err, context.DeadlineExceeded)
// also report true.
ErrCanceled = errors.New("comparator: comparison canceled")
// ErrInvalidPatch is returned by ApplyJSONPatch when a patch operation is
// malformed, references an unreachable path, or specifies an unsupported
// operation.
ErrInvalidPatch = errors.New("comparator: invalid JSON patch")
)