summaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/zebra/nexthop_flag_string.go
blob: 1ec9d6acb8e280fcd5ff5c7aa2ad684173c1b890 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Code generated by "stringer -type=NEXTHOP_FLAG"; DO NOT EDIT.

package zebra

import "strconv"

const (
	_NEXTHOP_FLAG_name_0 = "NEXTHOP_FLAG_ACTIVENEXTHOP_FLAG_FIB"
	_NEXTHOP_FLAG_name_1 = "NEXTHOP_FLAG_RECURSIVE"
	_NEXTHOP_FLAG_name_2 = "NEXTHOP_FLAG_ONLINK"
	_NEXTHOP_FLAG_name_3 = "NEXTHOP_FLAG_MATCHED"
	_NEXTHOP_FLAG_name_4 = "NEXTHOP_FLAG_FILTERED"
	_NEXTHOP_FLAG_name_5 = "NEXTHOP_FLAG_DUPLICATE"
	_NEXTHOP_FLAG_name_6 = "NEXTHOP_FLAG_EVPN_RVTEP"
)

var (
	_NEXTHOP_FLAG_index_0 = [...]uint8{0, 19, 35}
)

func (i NEXTHOP_FLAG) String() string {
	switch {
	case 1 <= i && i <= 2:
		i -= 1
		return _NEXTHOP_FLAG_name_0[_NEXTHOP_FLAG_index_0[i]:_NEXTHOP_FLAG_index_0[i+1]]
	case i == 4:
		return _NEXTHOP_FLAG_name_1
	case i == 8:
		return _NEXTHOP_FLAG_name_2
	case i == 16:
		return _NEXTHOP_FLAG_name_3
	case i == 32:
		return _NEXTHOP_FLAG_name_4
	case i == 64:
		return _NEXTHOP_FLAG_name_5
	case i == 128:
		return _NEXTHOP_FLAG_name_6
	default:
		return "NEXTHOP_FLAG(" + strconv.FormatInt(int64(i), 10) + ")"
	}
}