Skip to content

Commit

Permalink
Update string.go
Browse files Browse the repository at this point in the history
  • Loading branch information
samber authored Sep 19, 2024
1 parent 67489b2 commit 0dd622e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions string.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var (
splitWordReg = regexp.MustCompile(`([a-z])([A-Z0-9])|([a-zA-Z])([0-9])|([0-9])([a-zA-Z])|([A-Z])([A-Z])([a-z])`)
// bearer:disable go_lang_permissive_regex_validation
splitNumberLetterReg = regexp.MustCompile(`([0-9])([a-zA-Z])`)
MaximumCapacity = math.MaxInt>>1 + 1
maximumCapacity = math.MaxInt>>1 + 1
)

// RandomString return a random string.
Expand Down Expand Up @@ -81,8 +81,8 @@ func nearestPowerOfTwo(cap int) int {
if n < 0 {
return 1
}
if n >= MaximumCapacity {
return MaximumCapacity
if n >= maximumCapacity {
return maximumCapacity
}
return n + 1
}
Expand Down

0 comments on commit 0dd622e

Please sign in to comment.