mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
handle empty entries in column config
This commit is contained in:
parent
fc9bd9e5ca
commit
ffb96f4e90
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user