Add NETDEV type to Type enum and update String method
This commit is contained in:
@@ -10,10 +10,11 @@ const (
|
|||||||
INET
|
INET
|
||||||
ARP
|
ARP
|
||||||
BRIDGE
|
BRIDGE
|
||||||
|
NETDEV
|
||||||
)
|
)
|
||||||
|
|
||||||
func (f Type) String() string {
|
func (t Type) String() string {
|
||||||
switch f {
|
switch t {
|
||||||
case IP:
|
case IP:
|
||||||
return "ip"
|
return "ip"
|
||||||
case IP6:
|
case IP6:
|
||||||
@@ -24,7 +25,9 @@ func (f Type) String() string {
|
|||||||
return "arp"
|
return "arp"
|
||||||
case BRIDGE:
|
case BRIDGE:
|
||||||
return "bridge"
|
return "bridge"
|
||||||
|
case NETDEV:
|
||||||
|
return "netdev"
|
||||||
default:
|
default:
|
||||||
return fmt.Sprintf("Encoding(%d)", f)
|
return fmt.Sprintf("unknown family %d", t)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user