github.com/osrg/gobgp/v3@v3.30.0/pkg/zebra/safi_string.go (about) 1 // Code generated by "stringer -type=Safi"; 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[safiUnspec-0] 12 _ = x[SafiUnicast-1] 13 _ = x[safiMulticast-2] 14 _ = x[safiMplsVpn-3] 15 _ = x[safiEncap-4] 16 _ = x[safiEvpn-5] 17 _ = x[safiLabeledUnicast-6] 18 _ = x[safiFlowspec-7] 19 _ = x[safiMax-8] 20 _ = x[zapi4SafiMplsVpn-3] 21 _ = x[zapi3SafiMplsVpn-4] 22 _ = x[zapi4SafiEncap-5] 23 _ = x[zapi4SafiEvpn-6] 24 _ = x[zapi3SafiEncap-7] 25 } 26 27 const _Safi_name = "safiUnspecSafiUnicastsafiMulticastsafiMplsVpnsafiEncapsafiEvpnsafiLabeledUnicastsafiFlowspecsafiMax" 28 29 var _Safi_index = [...]uint8{0, 10, 21, 34, 45, 54, 62, 80, 92, 99} 30 31 func (i Safi) String() string { 32 if i >= Safi(len(_Safi_index)-1) { 33 return "Safi(" + strconv.FormatInt(int64(i), 10) + ")" 34 } 35 return _Safi_name[_Safi_index[i]:_Safi_index[i+1]] 36 }