mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
new: ble.enum and ble.write now support autocompletion
This commit is contained in:
parent
742e7fd8bb
commit
49e2116d46
4 changed files with 55 additions and 12 deletions
|
@ -95,3 +95,12 @@ func (b *BLE) Devices() (devices []*BLEDevice) {
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (b *BLE) EachDevice(cb func(mac string, d *BLEDevice)) {
|
||||
b.Lock()
|
||||
defer b.Unlock()
|
||||
|
||||
for m, dev := range b.devices {
|
||||
cb(m, dev)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue