Compare numeric values as int64
@@ -174,11 +174,11 @@ func sanitizeAndResolve(list []string, result *Result) []string {
return sanitizedList
}
-func sanitizeAndResolveNumerical(list []string, result *Result) []int {
- var sanitizedNumbers []int
+func sanitizeAndResolveNumerical(list []string, result *Result) []int64 {
+ var sanitizedNumbers []int64
sanitizedList := sanitizeAndResolve(list, result)
for _, element := range sanitizedList {
- if number, err := strconv.Atoi(element); err != nil {
+ if number, err := strconv.ParseInt(element, 10, 64); err != nil {
// Default to 0 if the string couldn't be converted to an integer
sanitizedNumbers = append(sanitizedNumbers, 0)
} else {
