1
0
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:
Christopher Probst
2017-04-28 20:07:20 +02:00
committed by Vishal Rana
parent 0dfcb31d9e
commit f3f3e99ba3
2 changed files with 30 additions and 1 deletions

View File

@ -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: