Documentation
¶
Index ¶
- type ListFormat
- type ListSortOrder
- type OutputFormat
- type OutputFormatter
- type OutputFormatterTable
- func (oft *OutputFormatterTable) AppendRow(row []interface{})
- func (oft *OutputFormatterTable) AppendRows(rows [][]interface{})
- func (oft *OutputFormatterTable) SetColumnWidthMax(widthMax []int)
- func (oft *OutputFormatterTable) SetHeader(header []string)
- func (oft *OutputFormatterTable) ToObject() OutputFormatterTableObject
- type OutputFormatterTableObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListFormat ¶
type ListFormat string
const ( // format ListFormatNormal ListFormat = "" ListFormatLong ListFormat = "long" ListFormatVeryLong ListFormat = "verylong" )
type ListSortOrder ¶
type ListSortOrder string
const ( // sort ListSortOrderNone ListSortOrder = "" ListSortOrderName ListSortOrder = "name" ListSortOrderSize ListSortOrder = "size" ListSortOrderTime ListSortOrder = "time" ListSortOrderExt ListSortOrder = "ext" )
func GetListSortOrder ¶
func GetListSortOrder(order string) ListSortOrder
GetListSortOrder returns ListSortOrder from string
type OutputFormat ¶
type OutputFormat string
const ( // format OutputFormatTable OutputFormat = "table" OutputFormatTSV OutputFormat = "tsv" OutputFormatCSV OutputFormat = "csv" OutputFormatJSON OutputFormat = "json" OutputFormatLegacy OutputFormat = "legacy" )
func GetOutputFormat ¶
func GetOutputFormat(order string) OutputFormat
GetOutputFormat returns OutputFormat from string
type OutputFormatter ¶ added in v0.11.2
type OutputFormatter struct {
Writer io.Writer
Tables []OutputFormatterTable
}
func NewOutputFormatter ¶ added in v0.11.2
func NewOutputFormatter(writer io.Writer) *OutputFormatter
func (*OutputFormatter) GetCurrentTable ¶ added in v0.11.2
func (of *OutputFormatter) GetCurrentTable() *OutputFormatterTable
func (*OutputFormatter) GetJSON ¶ added in v0.11.2
func (of *OutputFormatter) GetJSON(pretty bool) string
func (*OutputFormatter) NewTable ¶ added in v0.11.2
func (of *OutputFormatter) NewTable(title string) *OutputFormatterTable
func (*OutputFormatter) Render ¶ added in v0.11.2
func (of *OutputFormatter) Render(format OutputFormat)
func (*OutputFormatter) RenderJSON ¶ added in v0.11.2
func (of *OutputFormatter) RenderJSON()
type OutputFormatterTable ¶ added in v0.11.2
type OutputFormatterTable struct {
Title string
Header []string
WidthMax []int
Rows [][]interface{}
}
func (*OutputFormatterTable) AppendRow ¶ added in v0.11.2
func (oft *OutputFormatterTable) AppendRow(row []interface{})
func (*OutputFormatterTable) AppendRows ¶ added in v0.11.2
func (oft *OutputFormatterTable) AppendRows(rows [][]interface{})
func (*OutputFormatterTable) SetColumnWidthMax ¶ added in v0.11.3
func (oft *OutputFormatterTable) SetColumnWidthMax(widthMax []int)
func (*OutputFormatterTable) SetHeader ¶ added in v0.11.2
func (oft *OutputFormatterTable) SetHeader(header []string)
func (*OutputFormatterTable) ToObject ¶ added in v0.11.2
func (oft *OutputFormatterTable) ToObject() OutputFormatterTableObject
type OutputFormatterTableObject ¶ added in v0.11.2
Click to show internal directories.
Click to hide internal directories.