File: afi_string.go

package info (click to toggle)
gobgp 3.36.0-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie
  • size: 5,916 kB
  • sloc: python: 11,743; sh: 3,653; makefile: 90; cpp: 70
file content (27 lines) | stat: -rw-r--r-- 620 bytes parent folder | download | duplicates (3)
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
// Code generated by "stringer -type=afi"; DO NOT EDIT.

package zebra

import "strconv"

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, 5, 11, 19, 25}

func (i afi) String() string {
	i -= 1
	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]]
}