github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/pgwire/pgwirebase/formatcode_string.go (about) 1 // Code generated by "stringer -type=FormatCode"; DO NOT EDIT. 2 3 package pgwirebase 4 5 import "strconv" 6 7 func _() { 8 // An "invalid array index" compiler error signifies that the constant values have changed. 9 // Re-run the stringer command to generate them again. 10 var x [1]struct{} 11 _ = x[FormatText-0] 12 _ = x[FormatBinary-1] 13 } 14 15 const _FormatCode_name = "FormatTextFormatBinary" 16 17 var _FormatCode_index = [...]uint8{0, 10, 22} 18 19 func (i FormatCode) String() string { 20 if i >= FormatCode(len(_FormatCode_index)-1) { 21 return "FormatCode(" + strconv.FormatInt(int64(i), 10) + ")" 22 } 23 return _FormatCode_name[_FormatCode_index[i]:_FormatCode_index[i+1]] 24 }