2
0

Use netip package for representing inet and cidr types

This commit is contained in:
Jack Christensen
2022-07-10 14:29:44 -05:00
parent 7974a102fc
commit e7eb8a3250
8 changed files with 231 additions and 124 deletions
+2
View File
@@ -55,6 +55,8 @@ func mustParseInet(t testing.TB, s string) *net.IPNet {
if err == nil {
if ipv4 := ip.To4(); ipv4 != nil {
ipnet.IP = ipv4
} else {
ipnet.IP = ip
}
return ipnet
}