Skip to content
This repository was archived by the owner on Feb 27, 2018. It is now read-only.

Commit ca3d4e3

Browse files
committed
Ignore empty lines in config file
1 parent c4a48d3 commit ca3d4e3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ func readProfile(filename string) ([]string, error) {
154154
for s.Scan() {
155155
ln++
156156
line := strings.TrimSpace(s.Text())
157-
if strings.HasPrefix(line, "#") || strings.HasPrefix(line, ";") {
158-
// Ignore comment lines starting with # or ;
157+
if line == "" || strings.HasPrefix(line, "#") || strings.HasPrefix(line, ";") {
158+
// Ignore empty lines and comment lines starting with # or ;
159159
continue
160160
}
161161
res := reFlagLine.FindStringSubmatch(line)

0 commit comments

Comments
 (0)