You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whilst we could just change the usages (only cast to signed ints), that does not help the issue because negative values are nonsensical here. We even have int32 fields annotated with Minimum=1.
Anything else you would like to add:
I don't want to change the casts to signed as such. We will forget about them and end up with silly casts: linters won't complain about casts from uint32 to int64.
The text was updated successfully, but these errors were encountered:
Describe the solution you'd like
We have a lot of fields which are unnecessarily signed, e.g. ProxmoxMachineSpec.MemoryMiB which break code like requestedMemory := uint64(machine.Spec.MemoryMiB) * 1024 * 1024 which golangci-lint now complains about (you cannot cast a signed int to an unsigned int safely).
Whilst we could just change the usages (only cast to signed ints), that does not help the issue because negative values are nonsensical here. We even have int32 fields annotated with Minimum=1.
Anything else you would like to add:
I don't want to change the casts to signed as such. We will forget about them and end up with silly casts: linters won't complain about casts from uint32 to int64.
The text was updated successfully, but these errors were encountered: