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.
This commit is contained in:
Roman Verchikov 2016-11-19 13:40:56 -08:00 committed by Vish Ishaya
parent 17ea11b5a1
commit 482f7a52b7
1 changed files with 1 additions and 1 deletions

View File

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