-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Unit tests fail on 32-bit archs #644
Comments
Note that merely casting the untyped int constants in the unit test to int64 is not a viable solution either, since many of the underlying structs specify members as untyped ints, e.g. // MonthlyInstanceTransferStats pool stats for a Linode Instance network transfer statistics for a specific month
type MonthlyInstanceTransferStats struct {
// The amount of inbound public network traffic received by this Linode, in bytes, for a specific year/month.
BytesIn int `json:"bytes_in"`
// The amount of outbound public network traffic sent by this Linode, in bytes, for a specific year/month.
BytesOut int `json:"bytes_out"`
// The total amount of public network traffic sent and received by this Linode, in bytes, for a specific year/month.
BytesTotal int `json:"bytes_total"`
} These are highly likely to overflow when used on 32-bit archs, and really ought to be specified as
As it stands, this library really is not suitable for use on 32-bit archs, yet it would have been trivial to make it so. |
Related PR #605. |
@dswarbrick thanks for reporting this issue to us! We will discuss it and get back to you shortly. |
go Version
go version go1.23.2 linux/amd64
API Wrapper Version
github.com/linode/linodego v1.43.0
Code Snippet
Expected Behavior
Test should pass successfully on all supported Go archs.
Actual Behavior
Unit tests failed to build on 32-bit archs due to untyped int overflows.
Steps to Reproduce
Run tests with a 32-bit
GOARCH
, e.g. "386".The text was updated successfully, but these errors were encountered: