Skip to content

Warning: int vs int64 #98

@0cv

Description

@0cv

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions