goconst
goconst copied to clipboard
Support filtering number literals in bases other than decimals
The filtering logic for numbers uses [strconv.Atoi
](https://pkg.go.dev/strconv#Atoi to parse the value of numbers. This however assumes decimal and values in other bases like 0x0
are ignored even though they might be under the minimum threshold.
Replacing it by something like ParseInt(s, 0, 0)
would handle parsing it in bases 2, 8, or 16 (determined by the prefix) as well as base 10.