From 209910751f4acba7635cea24647f268200f30694 Mon Sep 17 00:00:00 2001 From: t3pm14r3 Date: Mon, 2 Sep 2024 13:56:44 +0300 Subject: [PATCH] replace unicode.IsDigit for number checking --- godotenv.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/godotenv.go b/godotenv.go index 54eebf4..0e64fb3 100644 --- a/godotenv.go +++ b/godotenv.go @@ -21,7 +21,6 @@ import ( "os/exec" "sort" "strings" - "unicode" ) const doubleQuoteSpecialChars = "\\\n\r\"!$`" @@ -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