mirror of
https://github.com/bettercap/bettercap
synced 2025-07-30 19:50:06 -07:00
more lint driven refactoring
This commit is contained in:
parent
0de6f3a76e
commit
1afab5d7be
7 changed files with 19 additions and 26 deletions
|
@ -35,13 +35,8 @@ func NewBLE(newcb BLEDevNewCallback, lostcb BLEDevLostCallback) *BLE {
|
|||
|
||||
func (b *BLE) MarshalJSON() ([]byte, error) {
|
||||
doc := bleJSON{
|
||||
Devices: make([]*BLEDevice, 0),
|
||||
Devices: b.Devices(),
|
||||
}
|
||||
|
||||
for _, dev := range b.Devices() {
|
||||
doc.Devices = append(doc.Devices, dev)
|
||||
}
|
||||
|
||||
return json.Marshal(doc)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue