From 9f2c45f19ee5724a3acf2f4c59d1448fec6d93a9 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 13 Jul 2025 10:25:26 +0300 Subject: [PATCH] maps.Copy --- cmd/mmc/main.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/mmc/main.go b/cmd/mmc/main.go index d367dc3..7e3ee59 100644 --- a/cmd/mmc/main.go +++ b/cmd/mmc/main.go @@ -27,6 +27,7 @@ import ( "io" "io/fs" "log" + "maps" "net/http" "net/url" "os" @@ -43,7 +44,7 @@ import ( "github.com/gorilla/websocket" "github.com/mattermost/mattermost-server/v6/model" "go.cypherpunks.su/netrc/v2" - "go.stargrave.org/mmc/internal" + mmc "go.stargrave.org/mmc/internal" ) var ( @@ -603,9 +604,7 @@ func main() { for u := range UserStatus { delete(UserStatus, u) } - for u, status := range statuses { - UserStatus[u] = status - } + maps.Copy(UserStatus, statuses) UserStatusM.Unlock() } } -- 2.50.0