refactor(binding): use maps.Copy for cleaner map handling (#4352)

Signed-off-by: russcoss <russcoss@outlook.com>
This commit is contained in:
russcoss 2025-09-26 23:03:59 -04:00 committed by GitHub
parent ed150e7254
commit 39858a0859
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,6 +7,7 @@ package binding
import (
"errors"
"fmt"
"maps"
"mime/multipart"
"reflect"
"strconv"
@ -489,9 +490,7 @@ func setFormMap(ptr any, form map[string][]string) error {
if !ok {
return ErrConvertMapStringSlice
}
for k, v := range form {
ptrMap[k] = v
}
maps.Copy(ptrMap, form)
return nil
}