github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/util/timeutil/pgdate/parsemode_string.go (about) 1 // Code generated by "stringer -type=ParseMode"; DO NOT EDIT. 2 3 package pgdate 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[ParseModeYMD-0] 12 _ = x[ParseModeDMY-1] 13 _ = x[ParseModeMDY-2] 14 } 15 16 const _ParseMode_name = "ParseModeYMDParseModeDMYParseModeMDY" 17 18 var _ParseMode_index = [...]uint8{0, 12, 24, 36} 19 20 func (i ParseMode) String() string { 21 if i >= ParseMode(len(_ParseMode_index)-1) { 22 return "ParseMode(" + strconv.FormatInt(int64(i), 10) + ")" 23 } 24 return _ParseMode_name[_ParseMode_index[i]:_ParseMode_index[i+1]] 25 }