Skip to content

Commit

Permalink
Update meta.go
Browse files Browse the repository at this point in the history
  • Loading branch information
tbuchaillot authored Jan 17, 2025
1 parent 216e7ee commit 09dfd03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions utils/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ func ToInt(value interface{}) int64 {
return 0
} else if i, err := strconv.ParseInt(result, 10, 64); err == nil {
return i
} else if f, err := strconv.ParseFloat(result, 64); err == nil {
return int64(f)
} else {
panic("failed to parse int: " + result)
}
Expand Down

0 comments on commit 09dfd03

Please sign in to comment.