mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-21 16:58:08 +08:00
Modify judgment conditions
This commit is contained in:
parent
071baf119c
commit
13d0acab58
@ -70,7 +70,7 @@ func mapping(value reflect.Value, field reflect.StructField, setter setter, tag
|
|||||||
return isSetted, nil
|
return isSetted, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if !(vKind == reflect.Struct && field.Anonymous) {
|
if vKind != reflect.Struct || !field.Anonymous {
|
||||||
ok, err := tryToSetValue(value, field, setter, tag)
|
ok, err := tryToSetValue(value, field, setter, tag)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user