Documentation ¶
Index ¶
- Variables
- func DefaultTB(w table.Writer)
- func RawPrint(toPrint ...any) (n int, err error)
- func WidthLen(str string) int
- type Across
- type Byline
- type CSVPrinter
- func (h CSVPrinter) AddAfterPrint(f ...func(Printer, ...Item))
- func (h CSVPrinter) AddBeforePrint(f ...func(Printer, ...Item))
- func (h CSVPrinter) DisableHookAfter()
- func (h CSVPrinter) DisableHookBefore()
- func (h CSVPrinter) EnableHookAfter()
- func (h CSVPrinter) EnableHookBefore()
- func (c *CSVPrinter) Print(s ...Item)
- type CommaPrint
- func (h CommaPrint) AddAfterPrint(f ...func(Printer, ...Item))
- func (h CommaPrint) AddBeforePrint(f ...func(Printer, ...Item))
- func (h CommaPrint) DisableHookAfter()
- func (h CommaPrint) DisableHookBefore()
- func (h CommaPrint) EnableHookAfter()
- func (h CommaPrint) EnableHookBefore()
- func (c *CommaPrint) Print(items ...Item)
- type Content
- type FitTerminal
- func (h FitTerminal) AddAfterPrint(f ...func(Printer, ...Item))
- func (h FitTerminal) AddBeforePrint(f ...func(Printer, ...Item))
- func (h FitTerminal) DisableHookAfter()
- func (h FitTerminal) DisableHookBefore()
- func (h FitTerminal) EnableHookAfter()
- func (h FitTerminal) EnableHookBefore()
- func (f *FitTerminal) Print(i ...Item)
- type HTMLPrinter
- func (h HTMLPrinter) AddAfterPrint(f ...func(Printer, ...Item))
- func (h HTMLPrinter) AddBeforePrint(f ...func(Printer, ...Item))
- func (h HTMLPrinter) DisableHookAfter()
- func (h HTMLPrinter) DisableHookBefore()
- func (h HTMLPrinter) EnableHookAfter()
- func (h HTMLPrinter) EnableHookBefore()
- func (p *HTMLPrinter) Print(s ...Item)
- type Hook
- type Item
- func (i *Item) Del(key string)
- func (i *Item) ExcludeOrderedContent(key ...string) string
- func (i *Item) Get(key string) (ItemContent, bool)
- func (i *Item) GetAll() map[string]ItemContent
- func (i *Item) GetAllOrdered() []ItemContent
- func (i *Item) IncludeOrderedContent(names ...string) string
- func (i *Item) Keys() []string
- func (i *Item) KeysByOrder() []string
- func (i *Item) OrderedContent() string
- func (i *Item) Set(key string, ic ItemContent)
- type ItemContent
- type ItemOptions
- type JsonPrinter
- func (h JsonPrinter) AddAfterPrint(f ...func(Printer, ...Item))
- func (h JsonPrinter) AddBeforePrint(f ...func(Printer, ...Item))
- func (h JsonPrinter) DisableHookAfter()
- func (h JsonPrinter) DisableHookBefore()
- func (h JsonPrinter) EnableHookAfter()
- func (h JsonPrinter) EnableHookBefore()
- func (j *JsonPrinter) Print(items ...Item)
- type MDPrinter
- func (h MDPrinter) AddAfterPrint(f ...func(Printer, ...Item))
- func (h MDPrinter) AddBeforePrint(f ...func(Printer, ...Item))
- func (h MDPrinter) DisableHookAfter()
- func (h MDPrinter) DisableHookBefore()
- func (h MDPrinter) EnableHookAfter()
- func (h MDPrinter) EnableHookBefore()
- func (m *MDPrinter) Print(s ...Item)
- type PrettyPrinter
- type Printer
- func NewAcross() Printer
- func NewByline() Printer
- func NewCSVPrinter() Printer
- func NewCommaPrint() Printer
- func NewFitTerminal() Printer
- func NewHTMLPrinter() Printer
- func NewJsonPrinter() Printer
- func NewMDPrinter() Printer
- func NewTablePrinter(opts ...func(writer table.Writer)) Printer
- func NewZero() Printer
- type StringContent
- type TablePrinter
- func (h TablePrinter) AddAfterPrint(f ...func(Printer, ...Item))
- func (h TablePrinter) AddBeforePrint(f ...func(Printer, ...Item))
- func (t *TablePrinter) AddFooter(footer string)
- func (t *TablePrinter) AddHeader(headers string)
- func (h TablePrinter) DisableHookAfter()
- func (h TablePrinter) DisableHookBefore()
- func (h TablePrinter) EnableHookAfter()
- func (h TablePrinter) EnableHookBefore()
- func (t *TablePrinter) Print(s ...Item)
- func (t *TablePrinter) PrintBase(fn func() string, s ...Item)
- func (t *TablePrinter) SetTitle(title string)
- type Zero
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UNICODEStyle = table.StyleRounded ASCIIStyle = table.StyleDefault DefaultTBStyle = ASCIIStyle )
View Source
var Output io.Writer = os.Stdout
Functions ¶
Types ¶
type Across ¶
func (Across) AddAfterPrint ¶
func (Across) AddBeforePrint ¶
func (Across) DisableHookAfter ¶ added in v0.8.0
func (h Across) DisableHookAfter()
func (Across) DisableHookBefore ¶ added in v0.8.0
func (h Across) DisableHookBefore()
func (Across) EnableHookAfter ¶ added in v0.8.0
func (h Across) EnableHookAfter()
func (Across) EnableHookBefore ¶ added in v0.8.0
func (h Across) EnableHookBefore()
type Byline ¶
func (Byline) AddAfterPrint ¶
func (Byline) AddBeforePrint ¶
func (Byline) DisableHookAfter ¶ added in v0.8.0
func (h Byline) DisableHookAfter()
func (Byline) DisableHookBefore ¶ added in v0.8.0
func (h Byline) DisableHookBefore()
func (Byline) EnableHookAfter ¶ added in v0.8.0
func (h Byline) EnableHookAfter()
func (Byline) EnableHookBefore ¶ added in v0.8.0
func (h Byline) EnableHookBefore()
type CSVPrinter ¶ added in v0.8.0
type CSVPrinter struct {
*TablePrinter
}
func (CSVPrinter) AddAfterPrint ¶ added in v0.8.0
func (CSVPrinter) AddBeforePrint ¶ added in v0.8.0
func (CSVPrinter) DisableHookAfter ¶ added in v0.8.0
func (h CSVPrinter) DisableHookAfter()
func (CSVPrinter) DisableHookBefore ¶ added in v0.8.0
func (h CSVPrinter) DisableHookBefore()
func (CSVPrinter) EnableHookAfter ¶ added in v0.8.0
func (h CSVPrinter) EnableHookAfter()
func (CSVPrinter) EnableHookBefore ¶ added in v0.8.0
func (h CSVPrinter) EnableHookBefore()
func (*CSVPrinter) Print ¶ added in v0.8.0
func (c *CSVPrinter) Print(s ...Item)
type CommaPrint ¶
type CommaPrint struct { *Across // contains filtered or unexported fields }
func (CommaPrint) AddAfterPrint ¶
func (CommaPrint) AddBeforePrint ¶
func (CommaPrint) DisableHookAfter ¶ added in v0.8.0
func (h CommaPrint) DisableHookAfter()
func (CommaPrint) DisableHookBefore ¶ added in v0.8.0
func (h CommaPrint) DisableHookBefore()
func (CommaPrint) EnableHookAfter ¶ added in v0.8.0
func (h CommaPrint) EnableHookAfter()
func (CommaPrint) EnableHookBefore ¶ added in v0.8.0
func (h CommaPrint) EnableHookBefore()
func (*CommaPrint) Print ¶
func (c *CommaPrint) Print(items ...Item)
type FitTerminal ¶
func (FitTerminal) AddAfterPrint ¶
func (FitTerminal) AddBeforePrint ¶
func (FitTerminal) DisableHookAfter ¶ added in v0.8.0
func (h FitTerminal) DisableHookAfter()
func (FitTerminal) DisableHookBefore ¶ added in v0.8.0
func (h FitTerminal) DisableHookBefore()
func (FitTerminal) EnableHookAfter ¶ added in v0.8.0
func (h FitTerminal) EnableHookAfter()
func (FitTerminal) EnableHookBefore ¶ added in v0.8.0
func (h FitTerminal) EnableHookBefore()
func (*FitTerminal) Print ¶
func (f *FitTerminal) Print(i ...Item)
type HTMLPrinter ¶ added in v0.8.0
type HTMLPrinter struct {
*TablePrinter
}
func (HTMLPrinter) AddAfterPrint ¶ added in v0.8.0
func (HTMLPrinter) AddBeforePrint ¶ added in v0.8.0
func (HTMLPrinter) DisableHookAfter ¶ added in v0.8.0
func (h HTMLPrinter) DisableHookAfter()
func (HTMLPrinter) DisableHookBefore ¶ added in v0.8.0
func (h HTMLPrinter) DisableHookBefore()
func (HTMLPrinter) EnableHookAfter ¶ added in v0.8.0
func (h HTMLPrinter) EnableHookAfter()
func (HTMLPrinter) EnableHookBefore ¶ added in v0.8.0
func (h HTMLPrinter) EnableHookBefore()
func (*HTMLPrinter) Print ¶ added in v0.8.0
func (p *HTMLPrinter) Print(s ...Item)
type Item ¶
type Item struct { Delimiter string // contains filtered or unexported fields }
func NewItem ¶
func NewItem(Ops ...ItemOptions) *Item
func (*Item) ExcludeOrderedContent ¶
ExcludeOrderedContent get content in order, exclude those match given parameter(ordered by itemContent.No, ascending)
func (*Item) GetAll ¶ added in v0.8.0
func (i *Item) GetAll() map[string]ItemContent
func (*Item) GetAllOrdered ¶ added in v0.8.0
func (i *Item) GetAllOrdered() []ItemContent
func (*Item) IncludeOrderedContent ¶
IncludeOrderedContent return those content inorder(ordered by itemContent.No, ascending)
func (*Item) KeysByOrder ¶
KeysByOrder return Keys(ordered by itemContent.No, ascending)
func (*Item) OrderedContent ¶
OrderedContent return all content in order(ordered by itemContent.No, ascending)
type ItemContent ¶
type ItemOptions ¶
type ItemOptions func(*Item)
func WithDelimiter ¶
func WithDelimiter(d string) ItemOptions
type JsonPrinter ¶ added in v0.8.0
func (JsonPrinter) AddAfterPrint ¶ added in v0.8.0
func (JsonPrinter) AddBeforePrint ¶ added in v0.8.0
func (JsonPrinter) DisableHookAfter ¶ added in v0.8.0
func (h JsonPrinter) DisableHookAfter()
func (JsonPrinter) DisableHookBefore ¶ added in v0.8.0
func (h JsonPrinter) DisableHookBefore()
func (JsonPrinter) EnableHookAfter ¶ added in v0.8.0
func (h JsonPrinter) EnableHookAfter()
func (JsonPrinter) EnableHookBefore ¶ added in v0.8.0
func (h JsonPrinter) EnableHookBefore()
func (*JsonPrinter) Print ¶ added in v0.8.0
func (j *JsonPrinter) Print(items ...Item)
type MDPrinter ¶ added in v0.8.0
type MDPrinter struct {
*TablePrinter
}
func (MDPrinter) AddAfterPrint ¶ added in v0.8.0
func (MDPrinter) AddBeforePrint ¶ added in v0.8.0
func (MDPrinter) DisableHookAfter ¶ added in v0.8.0
func (h MDPrinter) DisableHookAfter()
func (MDPrinter) DisableHookBefore ¶ added in v0.8.0
func (h MDPrinter) DisableHookBefore()
func (MDPrinter) EnableHookAfter ¶ added in v0.8.0
func (h MDPrinter) EnableHookAfter()
func (MDPrinter) EnableHookBefore ¶ added in v0.8.0
func (h MDPrinter) EnableHookBefore()
type PrettyPrinter ¶ added in v0.8.0
type Printer ¶
func NewCSVPrinter ¶ added in v0.8.0
func NewCSVPrinter() Printer
func NewCommaPrint ¶
func NewCommaPrint() Printer
func NewFitTerminal ¶
func NewFitTerminal() Printer
func NewHTMLPrinter ¶ added in v0.8.0
func NewHTMLPrinter() Printer
func NewJsonPrinter ¶ added in v0.8.0
func NewJsonPrinter() Printer
func NewMDPrinter ¶ added in v0.8.0
func NewMDPrinter() Printer
func NewTablePrinter ¶ added in v0.8.0
type StringContent ¶
type StringContent string
func (StringContent) String ¶
func (s StringContent) String() string
type TablePrinter ¶ added in v0.8.0
func (TablePrinter) AddAfterPrint ¶ added in v0.8.0
func (TablePrinter) AddBeforePrint ¶ added in v0.8.0
func (*TablePrinter) AddFooter ¶ added in v0.8.0
func (t *TablePrinter) AddFooter(footer string)
func (*TablePrinter) AddHeader ¶ added in v0.8.0
func (t *TablePrinter) AddHeader(headers string)
func (TablePrinter) DisableHookAfter ¶ added in v0.8.0
func (h TablePrinter) DisableHookAfter()
func (TablePrinter) DisableHookBefore ¶ added in v0.8.0
func (h TablePrinter) DisableHookBefore()
func (TablePrinter) EnableHookAfter ¶ added in v0.8.0
func (h TablePrinter) EnableHookAfter()
func (TablePrinter) EnableHookBefore ¶ added in v0.8.0
func (h TablePrinter) EnableHookBefore()
func (*TablePrinter) Print ¶ added in v0.8.0
func (t *TablePrinter) Print(s ...Item)
func (*TablePrinter) PrintBase ¶ added in v0.8.0
func (t *TablePrinter) PrintBase(fn func() string, s ...Item)
func (*TablePrinter) SetTitle ¶ added in v0.8.0
func (t *TablePrinter) SetTitle(title string)
type Zero ¶
func (Zero) AddAfterPrint ¶
func (Zero) AddBeforePrint ¶
func (Zero) DisableHookAfter ¶ added in v0.8.0
func (h Zero) DisableHookAfter()
func (Zero) DisableHookBefore ¶ added in v0.8.0
func (h Zero) DisableHookBefore()
func (Zero) EnableHookAfter ¶ added in v0.8.0
func (h Zero) EnableHookAfter()
func (Zero) EnableHookBefore ¶ added in v0.8.0
func (h Zero) EnableHookBefore()
Click to show internal directories.
Click to hide internal directories.