Skip to content

Commit

Permalink
upgrading function; using copy now
Browse files Browse the repository at this point in the history
  • Loading branch information
deemount committed Mar 23, 2024
1 parent 35d5708 commit a2a8c98
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions internals/utils/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ package utils
func MergeStringSliceToMap(m map[string][]interface{}, k string, v []interface{}) {
if m[k] == nil {
m[k] = make([]interface{}, len(v))
for i, s := range v {
m[k][i] = interface{}(s)
}
copy(m[k], v)
} else {
m[k] = append(m[k], v...)
}
Expand Down

0 comments on commit a2a8c98

Please sign in to comment.