github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/roleoption/option_string.go (about) 1 // Code generated by "stringer -type=Option"; DO NOT EDIT. 2 3 package roleoption 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[CREATEROLE-1] 12 _ = x[NOCREATEROLE-2] 13 _ = x[PASSWORD-3] 14 _ = x[LOGIN-4] 15 _ = x[NOLOGIN-5] 16 _ = x[VALIDUNTIL-6] 17 } 18 19 const _Option_name = "CREATEROLENOCREATEROLEPASSWORDLOGINNOLOGINVALIDUNTIL" 20 21 var _Option_index = [...]uint8{0, 10, 22, 30, 35, 42, 52} 22 23 func (i Option) String() string { 24 i -= 1 25 if i >= Option(len(_Option_index)-1) { 26 return "Option(" + strconv.FormatInt(int64(i+1), 10) + ")" 27 } 28 return _Option_name[_Option_index[i]:_Option_index[i+1]] 29 }