mirror of
https://github.com/labstack/echo.git
synced 2025-07-03 00:56:59 +02:00
Add pointer binding of proper types to DefaultBinder (#915)
This commit is contained in:
committed by
Vishal Rana
parent
0dfcb31d9e
commit
f3f3e99ba3
2
bind.go
2
bind.go
@ -142,6 +142,8 @@ func setWithProperType(valueKind reflect.Kind, val string, structField reflect.V
|
||||
}
|
||||
|
||||
switch valueKind {
|
||||
case reflect.Ptr:
|
||||
return setWithProperType(structField.Elem().Kind(), val, structField.Elem())
|
||||
case reflect.Int:
|
||||
return setIntField(val, 0, structField)
|
||||
case reflect.Int8:
|
||||
|
Reference in New Issue
Block a user