Documentation ¶
Index ¶
- Constants
- func EncodeJSON(w io.Writer, obj interface{}) error
- func EncodeYAML(w io.Writer, obj interface{}) error
- type Output
- type ResourcePrinter
- type TablePrinter
- func (p *TablePrinter) AppendRow(row []string)
- func (p *TablePrinter) NoTextWrap()
- func (p *TablePrinter) Print(writer io.Writer)
- func (p *TablePrinter) SeparateRows()
- func (p *TablePrinter) SetColumnAlignment(keys []int)
- func (p *TablePrinter) SetHeader(header []string)
- func (p *TablePrinter) TruncateBeginning(text string, max int) string
- func (p *TablePrinter) TruncateMiddle(text string, max int) string
- func (p *TablePrinter) TruncateMiddleWithEllipsisLocation(text string, ellipisLocation, max int) string
Constants ¶
View Source
const ( ALIGN_DEFAULT = iota ALIGN_CENTER ALIGN_RIGHT ALIGN_LEFT )
Variables ¶
This section is empty.
Functions ¶
func EncodeJSON ¶
func EncodeYAML ¶
Types ¶
type ResourcePrinter ¶
type TablePrinter ¶
type TablePrinter struct {
// contains filtered or unexported fields
}
func NewTablePrinter ¶
func NewTablePrinter() *TablePrinter
TODO: use make to set the size of the slice
func (*TablePrinter) AppendRow ¶
func (p *TablePrinter) AppendRow(row []string)
func (*TablePrinter) NoTextWrap ¶
func (p *TablePrinter) NoTextWrap()
func (*TablePrinter) Print ¶
func (p *TablePrinter) Print(writer io.Writer)
func (*TablePrinter) SeparateRows ¶
func (p *TablePrinter) SeparateRows()
func (*TablePrinter) SetColumnAlignment ¶
func (p *TablePrinter) SetColumnAlignment(keys []int)
func (*TablePrinter) SetHeader ¶
func (p *TablePrinter) SetHeader(header []string)
func (*TablePrinter) TruncateBeginning ¶ added in v0.15.0
func (p *TablePrinter) TruncateBeginning(text string, max int) string
func (*TablePrinter) TruncateMiddle ¶ added in v0.15.0
func (p *TablePrinter) TruncateMiddle(text string, max int) string
func (*TablePrinter) TruncateMiddleWithEllipsisLocation ¶ added in v0.15.0
func (p *TablePrinter) TruncateMiddleWithEllipsisLocation(text string, ellipisLocation, max int) string
Click to show internal directories.
Click to hide internal directories.