github.com/osrg/gobgp/v3@v3.30.0/pkg/zebra/ptmstatus_string.go (about) 1 // Code generated by "stringer -type=ptmStatus"; DO NOT EDIT. 2 3 package zebra 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[ptmStatusDown-0] 12 _ = x[ptmStatusUp-1] 13 _ = x[ptmStatusUnknown-2] 14 } 15 16 const _ptmStatus_name = "ptmStatusDownptmStatusUpptmStatusUnknown" 17 18 var _ptmStatus_index = [...]uint8{0, 13, 24, 40} 19 20 func (i ptmStatus) String() string { 21 if i >= ptmStatus(len(_ptmStatus_index)-1) { 22 return "ptmStatus(" + strconv.FormatInt(int64(i), 10) + ")" 23 } 24 return _ptmStatus_name[_ptmStatus_index[i]:_ptmStatus_index[i+1]] 25 }