Skip to content

Commit f9caf09

Browse files
committed
refactor: use maps.Copy for cleaner map handling
Signed-off-by: gopherorg <[email protected]>
1 parent 2e74b96 commit f9caf09

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/app.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"fmt"
77
"io"
88
"io/fs"
9+
"maps"
910
"net/http"
1011
"os"
1112
"path/filepath"
@@ -1010,9 +1011,7 @@ func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router) {
10101011
// GetMaccPerms returns a copy of the module account permissions
10111012
func GetMaccPerms() map[string][]string {
10121013
dupMaccPerms := make(map[string][]string)
1013-
for k, v := range maccPerms {
1014-
dupMaccPerms[k] = v
1015-
}
1014+
maps.Copy(dupMaccPerms, maccPerms)
10161015
return dupMaccPerms
10171016
}
10181017

0 commit comments

Comments
 (0)