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.
This commit is contained in:
jvoisin 2024-02-29 00:31:40 +01:00 committed by Frédéric Guillot
parent 543a690bfd
commit f4f8342245
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}
}