mirror of
https://github.com/bettercap/bettercap
synced 2025-07-30 11:40:33 -07:00
if block ends with a return statement drop this else and outdent its block
trying out some lint drive refactoring with golint :D
This commit is contained in:
parent
d91f8e0a75
commit
84864d5dc9
1 changed files with 6 additions and 7 deletions
|
@ -20,14 +20,13 @@ 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