more lint driven refactoring

This commit is contained in:
evilsocket 2018-04-24 18:26:16 +02:00
commit 0de6f3a76e
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
57 changed files with 168 additions and 241 deletions

View file

@ -73,7 +73,7 @@ func (d *Discovery) runDiff(cache network.ArpTable) {
var rem network.ArpTable = make(network.ArpTable)
d.Session.Lan.EachHost(func(mac string, e *network.Endpoint) {
if _, found := cache[mac]; found == false {
if _, found := cache[mac]; !found {
rem[mac] = e.IpAddress
}
})
@ -100,7 +100,6 @@ func (d *Discovery) Start() error {
return d.SetRunning(true, func() {
every := time.Duration(1) * time.Second
iface := d.Session.Interface.Name()
for d.Running() {
if table, err := network.ArpUpdate(iface); err != nil {
log.Error("%s", err)