mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-27 21:57:17 +01:00
refactor: run Go modernize
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
8319905d2c
commit
c280dd67a4
2 changed files with 3 additions and 4 deletions
|
|
@ -7,6 +7,7 @@ import (
|
|||
"crypto/sha256"
|
||||
"encoding/base64"
|
||||
"encoding/hex"
|
||||
"maps"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
|
|
@ -594,9 +595,7 @@ func (t *testableWebSocketService) getConnectionCount() int {
|
|||
func (t *testableWebSocketService) closeAllConnections() {
|
||||
t.mu.Lock()
|
||||
conns := make(map[string]*wsConnection, len(t.connections))
|
||||
for k, v := range t.connections {
|
||||
conns[k] = v
|
||||
}
|
||||
maps.Copy(conns, t.connections)
|
||||
t.connections = make(map[string]*wsConnection)
|
||||
t.mu.Unlock()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue