From 482f7a52b758233521878cb6c5904b6bd63f3457 Mon Sep 17 00:00:00 2001 From: Roman Verchikov Date: Sat, 19 Nov 2016 13:40:56 -0800 Subject: [PATCH] Inconsistent AddrList() interface The issue was noticed when building coreos/flannel on Mac. By default the build would fail with: pkg/ip/iface.go:32: cannot use link (type *netlink.Device) as type *netlink.Link in argument to netlink.AddrList: *netlink.Link is pointer to interface, not interface Resolved by making interfaces of AddList() implementations the same, although the reason for having `netlink_unspecified.go` is not fully clear to me and given that there's only one implementation available. Perhaps a better idea would be to remove the "interface" altoghether. --- netlink_unspecified.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlink_unspecified.go b/netlink_unspecified.go index 9ad7a62..557ec99 100644 --- a/netlink_unspecified.go +++ b/netlink_unspecified.go @@ -78,7 +78,7 @@ func AddrDel(link *Link, addr *Addr) error { return ErrNotImplemented } -func AddrList(link *Link, family int) ([]Addr, error) { +func AddrList(link Link, family int) ([]Addr, error) { return nil, ErrNotImplemented }