Skip to content

Commit

Permalink
replace unicode.IsDigit for number checking
Browse files Browse the repository at this point in the history
  • Loading branch information
t3mp14r3 committed Sep 2, 2024
1 parent 2f570db commit 2099107
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions godotenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
"os/exec"
"sort"
"strings"
"unicode"
)

const doubleQuoteSpecialChars = "\\\n\r\"!$`"
Expand Down Expand Up @@ -167,9 +166,10 @@ func isInt(s string) bool {
}

for _, r := range s {
if !unicode.IsDigit(r) {
return false
}
if '0' <= r && r <= '9' {
continue
}
return false
}

return true
Expand Down

0 comments on commit 2099107

Please sign in to comment.