Open eclipseo opened 3 years ago
The overflows in backup_test.go and snapshot_test.go are fairly self-explanatory, as the Backup
and Snapshot
structs use an untyped int
for the Size
member. This should be changed to an int64
, or even better, uint64
if there is no need to hold "magic" negative values.
The bare_metal_test.go is a bit more of an odd one. The Go struct is using an untyped int to hold a MAC address, as the Vultr API apparently returns it as such, e.g. "mac_address": 2199756823533
. Since ethernet MAC addresses are 48-bit, and most of them will have bits set in the "high" bytes, I would expect a very large majority of MAC addresses to overflow a 32-bit int.
A custom JSON unmarshaller would handle this more elegantly, and unmarshal the address into a Go https://pkg.go.dev/net#HardwareAddr.
While running the tests on 32 bits arches such at armv!7hl and i686, the following errors occur: