summaryrefslogtreecommitdiff
path: root/errorcode_string.go
diff options
context:
space:
mode:
Diffstat (limited to 'errorcode_string.go')
-rw-r--r--errorcode_string.go69
1 files changed, 69 insertions, 0 deletions
diff --git a/errorcode_string.go b/errorcode_string.go
new file mode 100644
index 0000000..97160a8
--- /dev/null
+++ b/errorcode_string.go
@@ -0,0 +1,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) + ")"
+ }
+}