Skip to content

Commit

Permalink
handle empty entries in column config
Browse files Browse the repository at this point in the history
  • Loading branch information
bcicen committed Oct 25, 2020
1 parent fc9bd9e commit ffb96f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ func Read() error {
if len(colStr) > 0 {
var colNames []string
for _, s := range strings.Split(colStr, ",") {
colNames = append(colNames, strings.TrimSpace(s))
s = strings.TrimSpace(s)
if s != "" {
colNames = append(colNames, strings.TrimSpace(s))
}
}
SetColumns(colNames)
}
Expand Down

0 comments on commit ffb96f4

Please sign in to comment.