8000 Not Support for nil macaddr · Issue #200 · jackc/pgtype · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Not Support for nil macaddr #200
Open
@rogerdwan

Description

@rogerdwan

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}
...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0