cleanup
This commit is contained in:
parent
585baea183
commit
41027fa380
5 changed files with 9 additions and 11 deletions
|
|
@ -14,10 +14,9 @@ func DefaultInterface() (iface string, err error) {
|
|||
return
|
||||
}
|
||||
if len(routes) >= 1 {
|
||||
link, e := netlink.LinkByIndex(routes[0].LinkIndex)
|
||||
if e != nil {
|
||||
err = e
|
||||
return
|
||||
link, err := netlink.LinkByIndex(routes[0].LinkIndex)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return link.Attrs().Name, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue