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

@ -58,7 +58,7 @@ func (b *BLE) AddIfNew(id string, p gatt.Peripheral, a *gatt.Advertisement, rssi
defer b.Unlock()
id = NormalizeMac(id)
if dev, found := b.devices[id]; found == true {
if dev, found := b.devices[id]; found {
dev.LastSeen = time.Now()
dev.RSSI = rssi
dev.Advertisement = a
@ -80,7 +80,7 @@ func (b *BLE) Remove(id string) {
defer b.Unlock()
id = NormalizeMac(id)
if dev, found := b.devices[id]; found == true {
if dev, found := b.devices[id]; found {
delete(b.devices, id)
if b.lostCb != nil {
b.lostCb(dev)