chore: style fixes from go fix (#10846)
Just `go fix ./...` Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
package discover
|
||||
|
||||
import (
|
||||
"maps"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -60,9 +61,7 @@ func (c *cache) Get(id protocol.DeviceID) (CacheEntry, bool) {
|
||||
func (c *cache) Cache() map[protocol.DeviceID]CacheEntry {
|
||||
c.mut.Lock()
|
||||
m := make(map[protocol.DeviceID]CacheEntry, len(c.entries))
|
||||
for k, v := range c.entries {
|
||||
m[k] = v
|
||||
}
|
||||
maps.Copy(m, c.entries)
|
||||
c.mut.Unlock()
|
||||
return m
|
||||
}
|
||||
|
||||
@@ -294,7 +294,7 @@ func (c *localClient) registerDevice(src net.Addr, device *discoproto.Announce)
|
||||
})
|
||||
|
||||
if isNewDevice {
|
||||
c.evLogger.Log(events.DeviceDiscovered, map[string]interface{}{
|
||||
c.evLogger.Log(events.DeviceDiscovered, map[string]any{
|
||||
"device": id.String(),
|
||||
"addrs": validAddresses,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user