mirror of
https://github.com/bettercap/bettercap
synced 2025-08-21 05:53:20 -07:00
more lint driven refactoring
This commit is contained in:
parent
7919cda5ec
commit
0de6f3a76e
57 changed files with 168 additions and 241 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue