-
Notifications
You must be signed in to change notification settings - Fork 16
/
protofamily_string.go
48 lines (42 loc) · 1.11 KB
/
protofamily_string.go
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
42
43
44
45
46
47
48
// Code generated by "stringer -type=ProtoFamily"; DO NOT EDIT.
package netfilter
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[ProtoUnspec-0]
_ = x[ProtoInet-1]
_ = x[ProtoIPv4-2]
_ = x[ProtoARP-3]
_ = x[ProtoNetDev-5]
_ = x[ProtoBridge-7]
_ = x[ProtoIPv6-10]
_ = x[ProtoDECNet-12]
}
const (
_ProtoFamily_name_0 = "ProtoUnspecProtoInetProtoIPv4ProtoARP"
_ProtoFamily_name_1 = "ProtoNetDev"
_ProtoFamily_name_2 = "ProtoBridge"
_ProtoFamily_name_3 = "ProtoIPv6"
_ProtoFamily_name_4 = "ProtoDECNet"
)
var (
_ProtoFamily_index_0 = [...]uint8{0, 11, 20, 29, 37}
)
func (i ProtoFamily) String() string {
switch {
case i <= 3:
return _ProtoFamily_name_0[_ProtoFamily_index_0[i]:_ProtoFamily_index_0[i+1]]
case i == 5:
return _ProtoFamily_name_1
case i == 7:
return _ProtoFamily_name_2
case i == 10:
return _ProtoFamily_name_3
case i == 12:
return _ProtoFamily_name_4
default:
return "ProtoFamily(" + strconv.FormatInt(int64(i), 10) + ")"
}
}