-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
errors.go
33 lines (18 loc) 路 867 Bytes
/
errors.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
package rat
import "fmt"
// ----------------------------- ErrIsZero ----------------------------
type ErrIsZero struct{ V any }
func (e ErrIsZero) Error() string { return fmt.Sprintf(ErrIsZeroT, e.V) }
// ---------------------------- ErrExpected ---------------------------
type ErrExpected struct{ V any }
func (e ErrExpected) Error() string { return fmt.Sprintf(ErrExpectedT, e.V) }
// ------------------------------ ErrArgs -----------------------------
type ErrArgs struct{ any }
func (e ErrArgs) Error() string {
return fmt.Sprintf(ErrArgsT, e.any)
}
// -------------------------- ErrNoCheckFunc --------------------------
type ErrNoCheckFunc struct{ V any }
func (e ErrNoCheckFunc) Error() string { return fmt.Sprintf(ErrNoCheckFuncT, e.V) }
// ---------------------------- ErrNotFound ---------------------------
type ErrNotFound struct{ any }