Allow reading floats as ints loosing precision

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2022-02-20 13:36:14 +01:00
parent f883bdd1c1
commit 135404862a
Signed by: luzifer
GPG Key ID: 0066F03ED215AD7D

View File

@ -220,6 +220,8 @@ func (f *FieldCollection) Int64(name string) (int64, error) {
}
switch v := v.(type) {
case float64:
return int64(v), nil
case int:
return int64(v), nil
case int16: