github.com/osrg/gobgp/v3@v3.30.0/pkg/zebra/nexthoptype_string.go (about) 1 // Code generated by "stringer -type=nexthopType"; 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[nexthopTypeIFIndex-1] 12 _ = x[nexthopTypeIPv4-2] 13 _ = x[nexthopTypeIPv4IFIndex-3] 14 _ = x[nexthopTypeIPv6-4] 15 _ = x[nexthopTypeIPv6IFIndex-5] 16 _ = x[nexthopTypeBlackhole-6] 17 _ = x[nexthopTypeIFName-2] 18 _ = x[backwardNexthopTypeIPv4-3] 19 _ = x[backwardNexthopTypeIPv4IFIndex-4] 20 _ = x[nexthopTypeIPv4IFName-5] 21 _ = x[backwardNexthopTypeIPv6-6] 22 _ = x[backwardNexthopTypeIPv6IFIndex-7] 23 _ = x[nexthopTypeIPv6IFName-8] 24 _ = x[backwardNexthopTypeBlackhole-9] 25 } 26 27 const _nexthopType_name = "nexthopTypeIFIndexnexthopTypeIPv4nexthopTypeIPv4IFIndexnexthopTypeIPv6nexthopTypeIPv6IFIndexnexthopTypeBlackholebackwardNexthopTypeIPv6IFIndexnexthopTypeIPv6IFNamebackwardNexthopTypeBlackhole" 28 29 var _nexthopType_index = [...]uint8{0, 18, 33, 55, 70, 92, 112, 142, 163, 191} 30 31 func (i nexthopType) String() string { 32 i -= 1 33 if i >= nexthopType(len(_nexthopType_index)-1) { 34 return "nexthopType(" + strconv.FormatInt(int64(i+1), 10) + ")" 35 } 36 return _nexthopType_name[_nexthopType_index[i]:_nexthopType_index[i+1]] 37 }