From 55a79dbd9d3a6067dc685d2544bf6f7b086c8651 Mon Sep 17 00:00:00 2001 From: Ada Date: Sat, 17 Feb 2024 00:32:55 +0100 Subject: [PATCH] :recycle: Simplifies return condition --- internal/utils/utils.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/utils/utils.go b/internal/utils/utils.go index 77d41fd..e29556a 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -33,10 +33,7 @@ func GenerateSecret() string { // CheckCharRedundant verify is a character is redundant in a string func CheckCharRedundant(source string, char string) bool { // Verify if a char is redundant - if strings.Count(source, char) > 1 { - return true - } - return false + return strings.Count(source, char) > 1 } func parseIntBeforeSeparator(source *string, sep string) (int, error) { // return 0 & error if error, only accept positive number -- 2.45.2