summaryrefslogtreecommitdiff
path: root/errorclass_string.go
diff options
context:
space:
mode:
authorlhchavez <[email protected]>2020-12-05 07:23:44 -0800
committerGitHub <[email protected]>2020-12-05 07:23:44 -0800
commit137c05e802d5e11a5ab54809bc8be8f61ccece21 (patch)
treeb44997824565f9506744a4259177746b83112e92 /errorclass_string.go
parent1fabe95fb7275df980ff6ab03fb85eac91c5849d (diff)
Mark some symbols to be deprecated #minor (#698)
This change introduces the file deprecated.go, which contains any constants, functions, and types that are slated to be deprecated in the next major release. These symbols are deprecated because they refer to old spellings in pre-1.0 libgit2. This also makes the build be done with the `-DDEPRECATE_HARD` flag to avoid regressions. This, together with [gorelease](https://godoc.org/golang.org/x/exp/cmd/gorelease)[1] should make releases safer going forward. 1: More information about how that works at https://go.googlesource.com/exp/+/refs/heads/master/apidiff/README.md
Diffstat (limited to 'errorclass_string.go')
-rw-r--r--errorclass_string.go63
1 files changed, 63 insertions, 0 deletions
diff --git a/errorclass_string.go b/errorclass_string.go
new file mode 100644
index 0000000..1223442
--- /dev/null
+++ b/errorclass_string.go
@@ -0,0 +1,63 @@
+// Code generated by "stringer -type ErrorClass -trimprefix ErrorClass -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[ErrorClassNone-0]
+ _ = x[ErrorClassNoMemory-1]
+ _ = x[ErrorClassOS-2]
+ _ = x[ErrorClassInvalid-3]
+ _ = x[ErrorClassReference-4]
+ _ = x[ErrorClassZlib-5]
+ _ = x[ErrorClassRepository-6]
+ _ = x[ErrorClassConfig-7]
+ _ = x[ErrorClassRegex-8]
+ _ = x[ErrorClassOdb-9]
+ _ = x[ErrorClassIndex-10]
+ _ = x[ErrorClassObject-11]
+ _ = x[ErrorClassNet-12]
+ _ = x[ErrorClassTag-13]
+ _ = x[ErrorClassTree-14]
+ _ = x[ErrorClassIndexer-15]
+ _ = x[ErrorClassSSL-16]
+ _ = x[ErrorClassSubmodule-17]
+ _ = x[ErrorClassThread-18]
+ _ = x[ErrorClassStash-19]
+ _ = x[ErrorClassCheckout-20]
+ _ = x[ErrorClassFetchHead-21]
+ _ = x[ErrorClassMerge-22]
+ _ = x[ErrorClassSSH-23]
+ _ = x[ErrorClassFilter-24]
+ _ = x[ErrorClassRevert-25]
+ _ = x[ErrorClassCallback-26]
+ _ = x[ErrorClassRebase-29]
+ _ = x[ErrorClassPatch-31]
+}
+
+const (
+ _ErrorClass_name_0 = "NoneNoMemoryOSInvalidReferenceZlibRepositoryConfigRegexOdbIndexObjectNetTagTreeIndexerSSLSubmoduleThreadStashCheckoutFetchHeadMergeSSHFilterRevertCallback"
+ _ErrorClass_name_1 = "Rebase"
+ _ErrorClass_name_2 = "Patch"
+)
+
+var (
+ _ErrorClass_index_0 = [...]uint8{0, 4, 12, 14, 21, 30, 34, 44, 50, 55, 58, 63, 69, 72, 75, 79, 86, 89, 98, 104, 109, 117, 126, 131, 134, 140, 146, 154}
+)
+
+func (i ErrorClass) String() string {
+ switch {
+ case 0 <= i && i <= 26:
+ return _ErrorClass_name_0[_ErrorClass_index_0[i]:_ErrorClass_index_0[i+1]]
+ case i == 29:
+ return _ErrorClass_name_1
+ case i == 31:
+ return _ErrorClass_name_2
+ default:
+ return "ErrorClass(" + strconv.FormatInt(int64(i), 10) + ")"
+ }
+}