kopia lustrzana https://github.com/muesli/mastotool
Show helper text for empty tables
rodzic
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.AppendSeparator()
|
||||
}
|
||||
if len(data) == 0 {
|
||||
tab.AppendRow(table.Row{emptyText})
|
||||
}
|
||||
|
||||
tab.Render()
|
||||
fmt.Println()
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue