From e9c1bf7070a50ed3bda1e25b487fa09257ab9f47 Mon Sep 17 00:00:00 2001 From: Dan Jones Date: Mon, 7 Oct 2024 15:50:02 -0500 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Return=20bool=20directly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Silly me --- tools/parse.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/parse.go b/tools/parse.go index 021c6a2..e69c476 100644 --- a/tools/parse.go +++ b/tools/parse.go @@ -24,11 +24,7 @@ func ParseString(in string) any { if null.MatchString(s) { return nil } else if yesno.MatchString(s) { - if yes.MatchString(s) { - return true - } else { - return false - } + return yes.MatchString(s) } else if i, err := strconv.Atoi(s); err == nil { return i } else if f, err := strconv.ParseFloat(s, 64); err == nil {