(macAddress string)
| 1753 | } |
| 1754 | |
| 1755 | func parseMACAddr(macAddress string) (network.HardwareAddr, error) { |
| 1756 | if macAddress == "" { |
| 1757 | return nil, nil |
| 1758 | } |
| 1759 | m, err := net.ParseMAC(macAddress) |
| 1760 | if err != nil { |
| 1761 | return nil, fmt.Errorf("invalid MAC address: %w", err) |
| 1762 | } |
| 1763 | return network.HardwareAddr(m), nil |
| 1764 | } |
no outgoing calls
no test coverage detected