inlet/snmp: use netip.Addr internally instead of string

Also, make SubnetMap use `netip.Addr` as well.
This commit is contained in:
Vincent Bernat
2022-08-27 08:13:28 +02:00
parent 7e3fc03c11
commit 6bfd3a0bd0
12 changed files with 147 additions and 121 deletions

View File

@@ -16,6 +16,7 @@ import (
"fmt"
"net"
"net/http"
"net/netip"
"os"
"reflect"
"testing"
@@ -34,6 +35,7 @@ var prettyC = pretty.Config{
IncludeUnexported: false,
Formatter: map[reflect.Type]interface{}{
reflect.TypeOf(net.IP{}): fmt.Sprint,
reflect.TypeOf(netip.Addr{}): fmt.Sprint,
reflect.TypeOf(time.Time{}): fmt.Sprint,
reflect.TypeOf(SubnetMap[string]{}): fmt.Sprint,
},