more lint driven refactoring

This commit is contained in:
evilsocket 2018-04-26 12:19:52 +02:00
parent 0de6f3a76e
commit 1afab5d7be
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
7 changed files with 19 additions and 26 deletions

View file

@ -16,15 +16,13 @@ type EndpointLostCallback func(e *Endpoint)
type LAN struct {
sync.Mutex
hosts map[string]*Endpoint
iface *Endpoint
gateway *Endpoint
ttl map[string]uint
aliases *Aliases
newCb EndpointNewCallback
lostCb EndpointLostCallback
aliasesFileName string
hosts map[string]*Endpoint
iface *Endpoint
gateway *Endpoint
ttl map[string]uint
aliases *Aliases
newCb EndpointNewCallback
lostCb EndpointLostCallback
}
type lanJSON struct {
@ -146,7 +144,7 @@ func (lan *LAN) shouldIgnore(ip, mac string) bool {
}
// skip everything which is not in our subnet (multicast noise)
addr := net.ParseIP(ip)
return lan.iface.Net.Contains(addr) == false
return !lan.iface.Net.Contains(addr)
}
func (lan *LAN) Has(ip string) bool {