Documentation ¶
Index ¶
- Variables
- func Output[T any](cmd *cobra.Command, columns []TableColumn[T], options OutputOptions, items []T) error
- func OutputNonTabular[T any](cmd *cobra.Command, options NonTabularOutputOptions, items []T) error
- func OutputOne[T any](cmd *cobra.Command, columns []TableColumn[T], options OutputOptions, item T) error
- func OutputOneNonTabular[T any](cmd *cobra.Command, options NonTabularOutputOptions, item T) error
- func ShortenTime(formattedTime string, maxLen int) string
- type NonTabularOutputOptions
- type OutputFormat
- type OutputOptions
- type TableColumn
Constants ¶
This section is empty.
Variables ¶
View Source
var AllFormats = append([]OutputFormat{TableFormat, CSVFormat}, NonTabularFormats...)
View Source
var NonTabularFormats = []OutputFormat{JSONFormat, YAMLFormat}
Functions ¶
func Output ¶
func Output[T any](cmd *cobra.Command, columns []TableColumn[T], options OutputOptions, items []T) error
func OutputNonTabular ¶ added in v1.1.0
func OutputNonTabular[T any](cmd *cobra.Command, options NonTabularOutputOptions, items []T) error
func OutputOne ¶
func OutputOne[T any](cmd *cobra.Command, columns []TableColumn[T], options OutputOptions, item T) error
func OutputOneNonTabular ¶ added in v1.1.0
func OutputOneNonTabular[T any](cmd *cobra.Command, options NonTabularOutputOptions, item T) error
func ShortenTime ¶ added in v1.1.0
Types ¶
type NonTabularOutputOptions ¶ added in v1.1.0
type NonTabularOutputOptions struct { Format OutputFormat // The output format for the list of jobs Pretty bool // Pretty print the output }
type OutputFormat ¶
type OutputFormat string
const ( TableFormat OutputFormat = "table" CSVFormat OutputFormat = "csv" JSONFormat OutputFormat = "json" YAMLFormat OutputFormat = "yaml" )
type OutputOptions ¶
type OutputOptions struct { Format OutputFormat // The output format for the list of jobs Pretty bool // Pretty print the output HideHeader bool // Hide the column headers NoStyle bool // Remove all styling from table output. Wide bool // Print full values in the table results }
type TableColumn ¶
type TableColumn[T any] struct { table.ColumnConfig Value func(T) string }
Click to show internal directories.
Click to hide internal directories.