Skip to content

Commit fa5e1c0

Browse files
committed
WIP
1 parent f3cc1ea commit fa5e1c0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

cli/cliui/table.go

+7-4
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ func Table() table.Writer {
2222
return tableWriter
2323
}
2424

25-
// This type can be supplied as part of a slice to DisplayTable or to a `TableFormat` `Format` call to render a separator
26-
// Trailing or leading separators are ignored by go-pretty
25+
// This type can be supplied as part of a slice to DisplayTable
26+
// or to a `TableFormat` `Format` call to render a separator.
27+
// Leading separators are not supported and trailing separators
28+
// are ignored by the table formatter.
2729
// e.g. `[]any{someRow, TableSeparator, someRow}`
2830
type TableSeparator struct{}
2931

@@ -53,8 +55,9 @@ func filterTableColumns(header table.Row, columns []string) []table.ColumnConfig
5355
}
5456

5557
// DisplayTable renders a table as a string. The input argument can be:
56-
// - a struct slice
57-
// - an interface slice, where the first element is a struct, and all other elements are of the same type, or a TableSeperator
58+
// - a struct slice.
59+
// - an interface slice, where the first element is a struct,
60+
// and all other elements are of the same type, or a TableSeperator.
5861
//
5962
// At least one field in the struct must have a `table:""` tag
6063
// containing the name of the column in the outputted table.

0 commit comments

Comments
 (0)