handle empty entries in column config

This commit is contained in:
Bradley Cicenas 2020-01-02 19:29:20 +00:00
parent 118b89240d
commit 6e60fc905e
No known key found for this signature in database
GPG Key ID: AF579ED4B93CBB5C

View File

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