handle empty entries in column config

This commit is contained in:
Bradley Cicenas 2020-01-02 19:29:20 +00:00
parent fc9bd9e5ca
commit ffb96f4e90

View File

@ -64,7 +64,10 @@ func Read() error {
if len(colStr) > 0 { if len(colStr) > 0 {
var colNames []string var colNames []string
for _, s := range strings.Split(colStr, ",") { 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) SetColumns(colNames)
} }