mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-25 22:40:25 +01:00
[#7022] added support for unmarshaling into interface fields
This commit is contained in:
1 parent
62c8523070
commit
5ca79eb85d
3 files changed
+23
-1
No files matched your search
@@ -296,6 +296,10 @@ func setRegularReflectedValue(rv reflect.Value, value string) error {
|
||||
}
|
||||
|
||||
rv.SetFloat(v)
|
||||
case reflect.Interface:
|
||||
if rv.CanSet() {
|
||||
rv.Set(reflect.ValueOf(inferValue(value)))
|
||||
}
|
||||
default:
|
||||
return errors.New("unknown value type " + rv.Kind().String())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user