-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathid_errs_gen.go
More file actions
34 lines (29 loc) · 894 Bytes
/
id_errs_gen.go
File metadata and controls
34 lines (29 loc) · 894 Bytes
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
// Code generated by 'gen-errors'; DO NOT EDIT
package klev
import (
"fmt"
)
func ErrIDInvalidFormat(id string) error {
return &APIError{
Code: "id-invalid-format",
Message: fmt.Sprintf("'%s' doesn't match 'prefix_suffix' format, missing '_'", id),
}
}
func ErrIDInvalidPrefix(id string, actual string, expected string) error {
return &APIError{
Code: "id-invalid-prefix",
Message: fmt.Sprintf("'%s' prefix '%s' doesn't match expected prefix '%s'", id, actual, expected),
}
}
func ErrIDInvalidSuffix(id string, actual string) error {
return &APIError{
Code: "id-invalid-suffix",
Message: fmt.Sprintf("'%s' suffix '%s' is not a valid KSUID", id, actual),
}
}
func ErrIDInvalidSuffixLen(id string, actual string) error {
return &APIError{
Code: "id-invalid-suffix-len",
Message: fmt.Sprintf("'%s' suffix '%s' is not expected length=27", id, actual),
}
}