-
Notifications
You must be signed in to change notification settings - Fork 315
/
errorcode_string.go
69 lines (63 loc) · 2.22 KB
/
errorcode_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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Code generated by "stringer -type ErrorCode -trimprefix ErrorCode -tags static"; DO NOT EDIT.
package git
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[ErrorCodeOK-0]
_ = x[ErrorCodeGeneric - -1]
_ = x[ErrorCodeNotFound - -3]
_ = x[ErrorCodeExists - -4]
_ = x[ErrorCodeAmbiguous - -5]
_ = x[ErrorCodeBuffs - -6]
_ = x[ErrorCodeUser - -7]
_ = x[ErrorCodeBareRepo - -8]
_ = x[ErrorCodeUnbornBranch - -9]
_ = x[ErrorCodeUnmerged - -10]
_ = x[ErrorCodeNonFastForward - -11]
_ = x[ErrorCodeInvalidSpec - -12]
_ = x[ErrorCodeConflict - -13]
_ = x[ErrorCodeLocked - -14]
_ = x[ErrorCodeModified - -15]
_ = x[ErrorCodeAuth - -16]
_ = x[ErrorCodeCertificate - -17]
_ = x[ErrorCodeApplied - -18]
_ = x[ErrorCodePeel - -19]
_ = x[ErrorCodeEOF - -20]
_ = x[ErrorCodeInvalid - -21]
_ = x[ErrorCodeUncommitted - -22]
_ = x[ErrorCodeDirectory - -23]
_ = x[ErrorCodeMergeConflict - -24]
_ = x[ErrorCodePassthrough - -30]
_ = x[ErrorCodeIterOver - -31]
_ = x[ErrorCodeRetry - -32]
_ = x[ErrorCodeMismatch - -33]
_ = x[ErrorCodeIndexDirty - -34]
_ = x[ErrorCodeApplyFail - -35]
}
const (
_ErrorCode_name_0 = "ApplyFailIndexDirtyMismatchRetryIterOverPassthrough"
_ErrorCode_name_1 = "MergeConflictDirectoryUncommittedInvalidEOFPeelAppliedCertificateAuthModifiedLockedConflictInvalidSpecNonFastForwardUnmergedUnbornBranchBareRepoUserBuffsAmbiguousExistsNotFound"
_ErrorCode_name_2 = "GenericOK"
)
var (
_ErrorCode_index_0 = [...]uint8{0, 9, 19, 27, 32, 40, 51}
_ErrorCode_index_1 = [...]uint8{0, 13, 22, 33, 40, 43, 47, 54, 65, 69, 77, 83, 91, 102, 116, 124, 136, 144, 148, 153, 162, 168, 176}
_ErrorCode_index_2 = [...]uint8{0, 7, 9}
)
func (i ErrorCode) String() string {
switch {
case -35 <= i && i <= -30:
i -= -35
return _ErrorCode_name_0[_ErrorCode_index_0[i]:_ErrorCode_index_0[i+1]]
case -24 <= i && i <= -3:
i -= -24
return _ErrorCode_name_1[_ErrorCode_index_1[i]:_ErrorCode_index_1[i+1]]
case -1 <= i && i <= 0:
i -= -1
return _ErrorCode_name_2[_ErrorCode_index_2[i]:_ErrorCode_index_2[i+1]]
default:
return "ErrorCode(" + strconv.FormatInt(int64(i), 10) + ")"
}
}