forked from coop-cloud/abra
parent
a06870f5cb
commit
dcf1a90c31
|
@ -34,19 +34,5 @@ func HumanDuration(timestamp int64) string {
|
||||||
func CreateTable(columns []string) *tablewriter.Table {
|
func CreateTable(columns []string) *tablewriter.Table {
|
||||||
table := tablewriter.NewWriter(os.Stdout)
|
table := tablewriter.NewWriter(os.Stdout)
|
||||||
table.SetHeader(columns)
|
table.SetHeader(columns)
|
||||||
|
|
||||||
// Settings to create very bare tab padded table
|
|
||||||
table.SetAutoWrapText(false)
|
|
||||||
table.SetAutoFormatHeaders(true)
|
|
||||||
table.SetHeaderAlignment(tablewriter.ALIGN_LEFT)
|
|
||||||
table.SetAlignment(tablewriter.ALIGN_LEFT)
|
|
||||||
table.SetCenterSeparator("")
|
|
||||||
table.SetColumnSeparator("")
|
|
||||||
table.SetRowSeparator("")
|
|
||||||
table.SetHeaderLine(false)
|
|
||||||
table.SetBorder(false)
|
|
||||||
table.SetTablePadding("\t") // pad with tabs
|
|
||||||
table.SetNoWhiteSpace(true)
|
|
||||||
table.SetColWidth(1)
|
|
||||||
return table
|
return table
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue