mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
afdb11514b
commit
38c94cb105
1 changed files with 5 additions and 1 deletions
|
@ -5,6 +5,8 @@ package network
|
|||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"github.com/evilsocket/islazy/data"
|
||||
)
|
||||
|
||||
type BLEDevice struct {
|
||||
|
@ -22,6 +24,7 @@ type BLEDevNewCallback func(dev *BLEDevice)
|
|||
type BLEDevLostCallback func(dev *BLEDevice)
|
||||
|
||||
type BLE struct {
|
||||
aliases *data.UnsortedKV
|
||||
devices map[string]*BLEDevice
|
||||
newCb BLEDevNewCallback
|
||||
lostCb BLEDevLostCallback
|
||||
|
@ -31,8 +34,9 @@ type bleJSON struct {
|
|||
Devices []*BLEDevice `json:"devices"`
|
||||
}
|
||||
|
||||
func NewBLE(newcb BLEDevNewCallback, lostcb BLEDevLostCallback) *BLE {
|
||||
func NewBLE(aliases *data.UnsortedKV, newcb BLEDevNewCallback, lostcb BLEDevLostCallback) *BLE {
|
||||
return &BLE{
|
||||
aliases: aliases,
|
||||
devices: make(map[string]*BLEDevice),
|
||||
newCb: newcb,
|
||||
lostCb: lostcb,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue