From 8b12e5bcafd93f3f5443b4dd72463864adf2cf7b Mon Sep 17 00:00:00 2001 From: pengbanban Date: Tue, 24 Dec 2024 18:17:46 +0800 Subject: [PATCH] refactor: using maps.Clone Signed-off-by: pengbanban --- app/app.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/app.go b/app/app.go index d19225ec1d8..11f8dc2806b 100644 --- a/app/app.go +++ b/app/app.go @@ -1294,10 +1294,7 @@ func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router) { // GetMaccPerms returns a copy of the module account permissions. func GetMaccPerms() map[string][]string { - dupMaccPerms := make(map[string][]string) - for k, v := range maccPerms { - dupMaccPerms[k] = v - } + dupMaccPerms := maps.Clone(maccPerms) return dupMaccPerms }