From ffb96f4e90bafd4518e10112a59e1d5e69f8278c Mon Sep 17 00:00:00 2001 From: Bradley Cicenas Date: Thu, 2 Jan 2020 19:29:20 +0000 Subject: [PATCH] handle empty entries in column config --- config/file.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/file.go b/config/file.go index fc08a06..2fff0ab 100644 --- a/config/file.go +++ b/config/file.go @@ -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) }