-
Notifications
You must be signed in to change notification settings - Fork 6
/
error.go
41 lines (32 loc) · 854 Bytes
/
error.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package catalog
import (
"github.com/giantswarm/microerror"
)
var invalidConfigError = µerror.Error{
Kind: "invalidConfigError",
}
// IsInvalidConfig asserts invalidConfigError.
func IsInvalidConfig(err error) bool {
return microerror.Cause(err) == invalidConfigError
}
var noMatchError = µerror.Error{
Kind: "noMatchError",
}
// IsNoMatch asserts noMatchError.
func IsNoMatch(err error) bool {
return microerror.Cause(err) == noMatchError
}
var noResourcesError = µerror.Error{
Kind: "noResourcesError",
}
// IsNoResources asserts noResourcesError.
func IsNoResources(err error) bool {
return microerror.Cause(err) == noResourcesError
}
var notFoundError = µerror.Error{
Kind: "notFoundError",
}
// IsNotFound asserts notFoundError.
func IsNotFound(err error) bool {
return microerror.Cause(err) == notFoundError
}