Documentation ¶
Index ¶
- type Console
- func (c *Console) IsCSV() bool
- func (c *Console) IsJSON() bool
- func (c *Console) IsJSONStream() bool
- func (c *Console) IsTable() bool
- func (c *Console) IsTextOutput() bool
- func (c *Console) Printf(format string, a ...interface{}) (int, error)
- func (c *Console) Println(a ...interface{}) (int, error)
- func (c *Console) SetHeaderFromInput(input string)
- func (c *Console) WithCSVHeader() bool
- func (c *Console) Write(b []byte) (n int, err error)
- type TableOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Console ¶
type Console struct { Colorized bool Compact bool Disabled bool Format config.OutputFormat TableViewer *tableviewer.TableView // contains filtered or unexported fields }
Console thread safe way to write to an output
func NewConsole ¶
NewConsole create a new console writer
func (*Console) IsJSONStream ¶
IsJSONStream check if json stream mode is activated
func (*Console) IsTextOutput ¶ added in v2.30.0
func (*Console) SetHeaderFromInput ¶
func (*Console) WithCSVHeader ¶
WithCSVHeader returns true if the csv output should include a header
type TableOptions ¶
type TableOptions struct { // MinColumnWidth minimum column width MinColumnWidth int // MinEmptyValueColumnWidth minimum column width to use when the value is empty // If set to 0, then the MinColumnWidth will be used MinEmptyValueColumnWidth int // MaxColumnWidth maximum column width MaxColumnWidth int // ColumnPadding column padding ColumnPadding int // Row mode (truncate or wrap) RowMode string }
TableOptions table options to control the column behaviour
Click to show internal directories.
Click to hide internal directories.