Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnDefinition ¶
type ColumnDefinitionFull ¶
type ColumnDefinitionFull[T any] struct { FieldValueFunc func(T, *PrintOpts) string FieldNameFunc func(*PrintOpts) string FieldName string TrimSize int }
func (ColumnDefinitionFull[T]) ToColumnDefinition ¶
func (tcd ColumnDefinitionFull[T]) ToColumnDefinition() ColumnDefinition
type PrintOpts ¶
type PrintOpts struct {
// Verbose indicates whether to print verbose output.
Verbose bool
// OmitFields indicates fields to omit.
OmitFields []string
// Wide indicates additional columns should be shown beyond the default set.
Wide bool
// CSV indicates output is destined for CSV format.
// Multi-value fields should use ";" instead of ", " as separator.
CSV bool
}
type Table ¶
type Table struct {
ColumnDefs []ColumnDefinition
Rows [][]string
}
func ColumnDefs2Table ¶
func ColumnDefs2Table[T any](tcdwv []ColumnDefinitionFull[T], data []T, opts *PrintOpts) Table
Click to show internal directories.
Click to hide internal directories.