2
0

Add pgtype.Macaddr

This commit is contained in:
Jack Christensen
2017-04-04 21:07:27 -05:00
parent 5be6819a8c
commit e5c48b17f2
5 changed files with 241 additions and 1 deletions
+9
View File
@@ -78,6 +78,15 @@ func mustParseCidr(t testing.TB, s string) *net.IPNet {
return ipnet
}
func mustParseMacaddr(t testing.TB, s string) net.HardwareAddr {
addr, err := net.ParseMAC(s)
if err != nil {
t.Fatal(err)
}
return addr
}
type forceTextEncoder struct {
e pgtype.TextEncoder
}