pgtype
pgtype copied to clipboard
Not Support for nil macaddr
Code in file macaddr.go
switch value := src.(type) {
case net.HardwareAddr:
// need to check if the len(value) is 0, otherwise, it want be able to insert null value for type macaddr
addr := make(net.HardwareAddr, len(value))
copy(addr, value)
*dst = Macaddr{Addr: addr, Status: Present}
case string:
addr, err := net.ParseMAC(value)
if err != nil {
return err
}
*dst = Macaddr{Addr: addr, Status: Present}
...
}
I am facing the same issue. Is there a fix for this, or I can create a PR for this