Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NullTableMiddleware ¶ added in v0.3.3
type NullTableMiddleware struct{}
The NullTableMiddleware is only used to keep rows in the TableProcessor.Table.
type OutputMiddleware ¶ added in v0.3.1
type OutputMiddleware struct {
// contains filtered or unexported fields
}
func NewOutputMiddleware ¶ added in v0.3.1
func NewOutputMiddleware(formatter formatters.TableOutputFormatter, writer io.Writer) *OutputMiddleware
type SortByMiddleware ¶
type SortByMiddleware struct {
// contains filtered or unexported fields
}
SortByMiddleware sorts the table by the given columns, in ascending or descending order. If the column contains rows with the same type, the order is undefined.
func NewSortByMiddlewareFromColumns ¶
func NewSortByMiddlewareFromColumns(columns ...string) *SortByMiddleware
NewSortByMiddlewareFromColumns creates a new SortByMiddleware from the given columns. To sort in descending order, prefix the column name with a minus sign.
Example:
NewSortByMiddlewareFromColumns("name", "-age")
This will sort by name in ascending order and by age in descending order.
Click to show internal directories.
Click to hide internal directories.