mirror of
https://github.com/bettercap/bettercap
synced 2025-07-16 10:03:39 -07:00
Revert "Minor refactors using golint"
This commit is contained in:
parent
9196be7a8b
commit
5328ced392
21 changed files with 101 additions and 70 deletions
|
@ -20,13 +20,14 @@ func FindGateway(iface *Endpoint) (*Endpoint, error) {
|
|||
return IPv4RouteIsGateway(iface.Name(), m, func(gateway string) (*Endpoint, error) {
|
||||
if gateway == iface.IpAddress {
|
||||
return iface, nil
|
||||
} else {
|
||||
// we have the address, now we need its mac
|
||||
mac, err := ArpLookup(iface.Name(), gateway, false)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewEndpoint(gateway, mac), nil
|
||||
}
|
||||
// we have the address, now we need its mac
|
||||
mac, err := ArpLookup(iface.Name(), gateway, false)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return NewEndpoint(gateway, mac), nil
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue