lang: funcs: Use correct constant

This commit is contained in:
James Shubin
2024-08-18 17:31:37 -04:00
parent f2d4cac92d
commit 211121cdca
2 changed files with 2 additions and 2 deletions

View File

@@ -205,7 +205,7 @@ func (obj *ListLookupDefaultFunc) Stream(ctx context.Context) error {
// TODO: should we handle overflow by returning default? // TODO: should we handle overflow by returning default?
if index > math.MaxInt { // max int size varies by arch if index > math.MaxInt { // max int size varies by arch
return fmt.Errorf("list index overflow, got: %d, max is: %d", index, math.MaxInt32) return fmt.Errorf("list index overflow, got: %d, max is: %d", index, math.MaxInt)
} }
// negative index values are "not found" here! // negative index values are "not found" here!

View File

@@ -190,7 +190,7 @@ func (obj *ListLookupFunc) Stream(ctx context.Context) error {
// TODO: should we handle overflow by returning zero? // TODO: should we handle overflow by returning zero?
if index > math.MaxInt { // max int size varies by arch if index > math.MaxInt { // max int size varies by arch
return fmt.Errorf("list index overflow, got: %d, max is: %d", index, math.MaxInt32) return fmt.Errorf("list index overflow, got: %d, max is: %d", index, math.MaxInt)
} }
// negative index values are "not found" here! // negative index values are "not found" here!