Skip to content

Commit

Permalink
refactor: using maps.Clone
Browse files Browse the repository at this point in the history
Signed-off-by: pengbanban <[email protected]>
  • Loading branch information
pengbanban committed Dec 24, 2024
1 parent 05d1acd commit 58ff64f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/pfm/simapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package pfm
import (
"encoding/json"
"io"
"maps"
"net/http"
"os"
"path/filepath"
Expand Down Expand Up @@ -805,10 +806,7 @@ func RegisterSwaggerAPI(_ 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
}

Expand Down

0 comments on commit 58ff64f

Please sign in to comment.