-
Notifications
You must be signed in to change notification settings - Fork 0
/
codetype_string.go
46 lines (40 loc) · 1.3 KB
/
codetype_string.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
42
43
44
45
46
// Code generated by "stringer -type=CodeType"; DO NOT EDIT.
package types
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[CodeSuccess-0]
_ = x[CodeVersionError-1]
_ = x[CodeUpdating-101]
_ = x[CodeNotFound-1000]
_ = x[CodeRequestUrlParamError-1001]
_ = x[CodeRequestQueryParamError-1002]
_ = x[CodeRequestCommonParamError-1003]
_ = x[CodeRequestBodyError-1004]
_ = x[CodeNotAllow-1005]
_ = x[CodeServerError-1006]
}
const (
_CodeType_name_0 = "CodeSuccessCodeVersionError"
_CodeType_name_1 = "CodeUpdating"
_CodeType_name_2 = "CodeNotFoundCodeRequestUrlParamErrorCodeRequestQueryParamErrorCodeRequestCommonParamErrorCodeRequestBodyErrorCodeNotAllowCodeServerError"
)
var (
_CodeType_index_0 = [...]uint8{0, 11, 27}
_CodeType_index_2 = [...]uint8{0, 12, 36, 62, 89, 109, 121, 136}
)
func (i CodeType) String() string {
switch {
case 0 <= i && i <= 1:
return _CodeType_name_0[_CodeType_index_0[i]:_CodeType_index_0[i+1]]
case i == 101:
return _CodeType_name_1
case 1000 <= i && i <= 1006:
i -= 1000
return _CodeType_name_2[_CodeType_index_2[i]:_CodeType_index_2[i+1]]
default:
return "CodeType(" + strconv.FormatInt(int64(i), 10) + ")"
}
}