mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-11-09 08:40:01 +00:00
Allow reading floats as ints loosing precision
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
f883bdd1c1
commit
135404862a
1 changed files with 2 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue