Commit Graph
1 Commits
Author SHA1 Message Date
Luis Gustavo S. Barretoand无闻 7ddae1ffd1 struct: fix integer overflow in time.Duration conversion (#126)
* Add specific test for time.Duration conversion

This test will fail on 32 bits system

* Fix integer overflow in time.Duration conversion

According to the Go documentation, a time.Duration is represented by
int64 nanoseconds count, so we need to cast to int64 to avoid integer
overflow in 32 bits systems.
2017-10-26 14:12:52 -04:00