go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/gae/service/datastore/toggle_string.go (about) 1 // Code generated by "stringer -type=Toggle"; DO NOT EDIT. 2 3 package datastore 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[Auto-0] 12 _ = x[On-1] 13 _ = x[Off-2] 14 } 15 16 const _Toggle_name = "AutoOnOff" 17 18 var _Toggle_index = [...]uint8{0, 4, 6, 9} 19 20 func (i Toggle) String() string { 21 if i >= Toggle(len(_Toggle_index)-1) { 22 return "Toggle(" + strconv.FormatInt(int64(i), 10) + ")" 23 } 24 return _Toggle_name[_Toggle_index[i]:_Toggle_index[i+1]] 25 }