github.com/osrg/gobgp@v2.0.0+incompatible/internal/pkg/zebra/afi_string.go (about) 1 // Code generated by "stringer -type=AFI"; DO NOT EDIT. 2 3 package zebra 4 5 import "strconv" 6 7 const _AFI_name = "AFI_IPAFI_IP6AFI_ETHERAFI_MAX" 8 9 var _AFI_index = [...]uint8{0, 6, 13, 22, 29} 10 11 func (i AFI) String() string { 12 i -= 1 13 if i >= AFI(len(_AFI_index)-1) { 14 return "AFI(" + strconv.FormatInt(int64(i+1), 10) + ")" 15 } 16 return _AFI_name[_AFI_index[i]:_AFI_index[i+1]] 17 }