github.com/dolthub/dolt/go@v0.40.5-0.20240520175717-68db7794bea6/store/prolly/tree/diffop_string.go (about) 1 // Copyright 2023 Dolthub, Inc. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Code generated by "stringer -type=diffOp -linecomment"; DO NOT EDIT. 16 17 package tree 18 19 import "strconv" 20 21 func _() { 22 // An "invalid array index" compiler error signifies that the constant values have changed. 23 // Re-run the stringer command to generate them again. 24 var x [1]struct{} 25 _ = x[DiffOpLeftAdd-0] 26 _ = x[DiffOpRightAdd-1] 27 _ = x[DiffOpLeftDelete-2] 28 _ = x[DiffOpRightDelete-3] 29 _ = x[DiffOpLeftModify-4] 30 _ = x[DiffOpRightModify-5] 31 _ = x[DiffOpConvergentAdd-6] 32 _ = x[DiffOpConvergentDelete-7] 33 _ = x[DiffOpConvergentModify-8] 34 _ = x[DiffOpDivergentModifyResolved-9] 35 _ = x[DiffOpDivergentDeleteConflict-10] 36 _ = x[DiffOpDivergentModifyConflict-11] 37 } 38 39 const _diffOp_name = "leftAddrightAddleftDeleterightDeleteleftModifyrightModifyconvergentAddconvergentDeleteconvergentModifydivergenModifytResolveddivergentDeleteConflictdivergentModifyConflict" 40 41 var _diffOp_index = [...]uint8{0, 7, 15, 25, 36, 46, 57, 70, 86, 102, 125, 148, 171} 42 43 func (i DiffOp) String() string { 44 if i >= DiffOp(len(_diffOp_index)-1) { 45 return "diffOp(" + strconv.FormatInt(int64(i), 10) + ")" 46 } 47 return _diffOp_name[_diffOp_index[i]:_diffOp_index[i+1]] 48 }