From 09ac9993467fa5e2b7b063c6a99d23ebda33eafb Mon Sep 17 00:00:00 2001 From: Leonid Nikitin Date: Mon, 20 Oct 2025 22:45:13 +0500 Subject: [PATCH] Add NETDEV type to Type enum and update String method --- family/type.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/family/type.go b/family/type.go index d3c32e8..1c7ea34 100644 --- a/family/type.go +++ b/family/type.go @@ -10,10 +10,11 @@ const ( INET ARP BRIDGE + NETDEV ) -func (f Type) String() string { - switch f { +func (t Type) String() string { + switch t { case IP: return "ip" case IP6: @@ -24,7 +25,9 @@ func (f Type) String() string { return "arp" case BRIDGE: return "bridge" + case NETDEV: + return "netdev" default: - return fmt.Sprintf("Encoding(%d)", f) + return fmt.Sprintf("unknown family %d", t) } }