From f4f8342245c0cdf812257f0a9f0c43c996f40515 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 29 Feb 2024 00:31:40 +0100 Subject: [PATCH] Remove a superfluous condition No need to check if the length of `line` is positive since we're checking afterwards that it contains the `=` sign. --- internal/config/parser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/config/parser.go b/internal/config/parser.go index 65c98231..ea419f30 100644 --- a/internal/config/parser.go +++ b/internal/config/parser.go @@ -56,7 +56,7 @@ func (p *Parser) parseFileContent(r io.Reader) (lines []string) { scanner := bufio.NewScanner(r) for scanner.Scan() { line := strings.TrimSpace(scanner.Text()) - if len(line) > 0 && !strings.HasPrefix(line, "#") && strings.Index(line, "=") > 0 { + if !strings.HasPrefix(line, "#") && strings.Index(line, "=") > 0 { lines = append(lines, line) } }