lang: funcs: Use correct constant
This commit is contained in:
@@ -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!
|
||||||
|
|||||||
@@ -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!
|
||||||
|
|||||||
Reference in New Issue
Block a user