more lint driven refactoring

This commit is contained in:
evilsocket 2018-04-26 12:19:52 +02:00
parent 0de6f3a76e
commit 1afab5d7be
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
7 changed files with 19 additions and 26 deletions

View file

@ -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)
}