Refactor table management to use a dedicated API and improve command handling.
This commit is contained in:
30
family/type.go
Normal file
30
family/type.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package family
|
||||
|
||||
import "fmt"
|
||||
|
||||
type Type int8
|
||||
|
||||
const (
|
||||
IP Type = iota + 1
|
||||
IP6
|
||||
INET
|
||||
ARP
|
||||
BRIDGE
|
||||
)
|
||||
|
||||
func (f Type) String() string {
|
||||
switch f {
|
||||
case IP:
|
||||
return "ip"
|
||||
case IP6:
|
||||
return "ip6"
|
||||
case INET:
|
||||
return "inet"
|
||||
case ARP:
|
||||
return "arp"
|
||||
case BRIDGE:
|
||||
return "bridge"
|
||||
default:
|
||||
return fmt.Sprintf("Encoding(%d)", f)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user