mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-12 02:58:08 +08:00
refactor(binding): use maps.Copy for cleaner map handling (#4352)
Signed-off-by: russcoss <russcoss@outlook.com>
This commit is contained in:
parent
ed150e7254
commit
39858a0859
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user