mirror of https://github.com/muesli/mastotool
Show helper text for empty tables
This commit is contained in:
parent
b43f0d52a9
commit
3f563e17e6
4
stats.go
4
stats.go
|
@ -273,6 +273,10 @@ func printTable(cols []string, emptyText string, data []kv) {
|
||||||
tab.AppendRow([]interface{}{kv.Key, kv.Value})
|
tab.AppendRow([]interface{}{kv.Key, kv.Value})
|
||||||
tab.AppendSeparator()
|
tab.AppendSeparator()
|
||||||
}
|
}
|
||||||
|
if len(data) == 0 {
|
||||||
|
tab.AppendRow(table.Row{emptyText})
|
||||||
|
}
|
||||||
|
|
||||||
tab.Render()
|
tab.Render()
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue