fix field setting
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
8074f9f617
commit
f3573e651b
4
util.go
4
util.go
@ -124,8 +124,10 @@ func newPathRequest(path string, method string, body string, msg interface{}, ta
|
|||||||
default:
|
default:
|
||||||
fieldsmap[t.name] = fmt.Sprintf("%v", val.Interface())
|
fieldsmap[t.name] = fmt.Sprintf("%v", val.Interface())
|
||||||
}
|
}
|
||||||
} else if (body == "*" || body == t.name) && method != http.MethodGet && tnmsg.Field(i).CanSet() {
|
} else if (body == "*" || body == t.name) && method != http.MethodGet {
|
||||||
|
if tnmsg.Field(i).CanSet() {
|
||||||
tnmsg.Field(i).Set(val)
|
tnmsg.Field(i).Set(val)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if val.Type().Kind() == reflect.Slice {
|
if val.Type().Kind() == reflect.Slice {
|
||||||
for idx := 0; idx < val.Len(); idx++ {
|
for idx := 0; idx < val.Len(); idx++ {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user