diff options
author | Hitoshi Irino <irino@sfc.wide.ad.jp> | 2020-04-25 22:06:21 +0900 |
---|---|---|
committer | Hitoshi Irino <irino@sfc.wide.ad.jp> | 2020-04-26 07:43:50 +0900 |
commit | cf572bc5fc4647ea675c8a3482d80d181f62c66c (patch) | |
tree | b50bc6a682c801062ffe19a198b05ddc743a84ee /internal/pkg/zebra/afi_string.go | |
parent | f11b9c7afb198dd6bfea9a167f41a62569f24756 (diff) |
Refactoring Zebra and supporting frr7.3
- Change const values to camel case from snake case to make zero golint's warnigns
- Introduce convert functions (toEach, toCommon) between the newest version to older versions
- Merge code about decode nexthop to reduce lines of code
- Add frr7.3 statemet in allowable software for config
- Rename and Update generated file by stringer
Diffstat (limited to 'internal/pkg/zebra/afi_string.go')
-rw-r--r-- | internal/pkg/zebra/afi_string.go | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/internal/pkg/zebra/afi_string.go b/internal/pkg/zebra/afi_string.go index 6a4278a3..1cda4d15 100644 --- a/internal/pkg/zebra/afi_string.go +++ b/internal/pkg/zebra/afi_string.go @@ -1,17 +1,27 @@ -// Code generated by "stringer -type=AFI"; DO NOT EDIT. +// Code generated by "stringer -type=afi"; DO NOT EDIT. package zebra import "strconv" -const _AFI_name = "AFI_IPAFI_IP6AFI_ETHERAFI_MAX" +func _() { + // An "invalid array index" compiler error signifies that the constant values have changed. + // Re-run the stringer command to generate them again. + var x [1]struct{} + _ = x[afiIP-1] + _ = x[afiIP6-2] + _ = x[afiEther-3] + _ = x[afiMax-4] +} + +const _afi_name = "afiIPafiIP6afiEtherafiMax" -var _AFI_index = [...]uint8{0, 6, 13, 22, 29} +var _afi_index = [...]uint8{0, 5, 11, 19, 25} -func (i AFI) String() string { +func (i afi) String() string { i -= 1 - if i >= AFI(len(_AFI_index)-1) { - return "AFI(" + strconv.FormatInt(int64(i+1), 10) + ")" + if i >= afi(len(_afi_index)-1) { + return "afi(" + strconv.FormatInt(int64(i+1), 10) + ")" } - return _AFI_name[_AFI_index[i]:_AFI_index[i+1]] + return _afi_name[_afi_index[i]:_afi_index[i+1]] } |