Skip to content
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

Warning: int vs int64 #98

Open
0cv opened this issue Mar 6, 2023 · 0 comments
Open

Warning: int vs int64 #98

0cv opened this issue Mar 6, 2023 · 0 comments

Comments

@0cv
Copy link
Contributor

0cv commented Mar 6, 2023

There are quite a few places in the app where int is used which is a placeholder for int32 on 32 bits machine and for int64 on 64 bits machine. While 32 bits machine are barely used anymore, thus int defaults to int64, if it were used (or compiled to, like mistakenly in my case, good catch hah!), this will fail to parse a java timestamp, both in the signature such as here or here, or will also fail to parse the response, such as here.

Typically the response error is
json: cannot unmarshal number 1,678,091,666,059 into Go struct field CommonV5Response.time of type int. Indeed because a int32 is maxed out at 2,147,483,647

Probably a low priority issue, but I think int64 shall be used to force 32bits machine to really use 64 bits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant