use continue instead of else to skip empty lines and comments

main
msfendourakis 2021-02-01 14:37:57 +02:00
parent f926abe009
commit d9d1d01958
1 changed files with 30 additions and 30 deletions

View File

@ -41,7 +41,8 @@ func (r *DriftIgnore) readIgnoreFile() error {
logrus.WithFields(logrus.Fields{
"line": line,
}).Debug("Skipped comment or empty line")
} else {
continue
}
typeVal := readDriftIgnoreLine(line)
nbArgs := len(typeVal)
if nbArgs < 2 {
@ -75,7 +76,6 @@ func (r *DriftIgnore) readIgnoreFile() error {
ignoreSublist = append(ignoreSublist, path)
r.driftExclusionList[res] = ignoreSublist
}
}
if err := scanner.Err(); err != nil {
return err