Skip to content

Commit

Permalink
int overflow issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnukumavat committed Jul 8, 2024
1 parent 5e021f6 commit 0a2e882
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions types/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ func IsOverflow(r interface{}) bool {
case string:
s := strings.ToLower(r)
return strings.Contains(s, "overflow") || strings.HasSuffix(s, "out of bound")
case error:
s := strings.ToLower(r.Error())
return strings.Contains(s, "overflow") || strings.HasSuffix(s, "out of bound")
}
return false
}
Expand Down

0 comments on commit 0a2e882

Please sign in to comment.