Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultTB(w table.Writer)
- func RawPrint(toPrint ...any) (n int, err error)
- func WidthLen(str string) int
- func WidthNoHyperLinkLen(str string) int
- type Across
- func (h Across) AddAfterPrint(f ...func(Printer, ...*item.FileInfo))
- func (h Across) AddBeforePrint(f ...func(Printer, ...*item.FileInfo))
- func (h Across) DisablePostHook()
- func (h Across) DisablePreHook()
- func (h Across) EnablePostHook()
- func (h Across) EnablePreHook()
- func (a *Across) Print(items ...*item.FileInfo)
- type Byline
- func (h Byline) AddAfterPrint(f ...func(Printer, ...*item.FileInfo))
- func (h Byline) AddBeforePrint(f ...func(Printer, ...*item.FileInfo))
- func (h Byline) DisablePostHook()
- func (h Byline) DisablePreHook()
- func (h Byline) EnablePostHook()
- func (h Byline) EnablePreHook()
- func (b *Byline) Print(i ...*item.FileInfo)
- type CSVPrinter
- func (h CSVPrinter) AddAfterPrint(f ...func(Printer, ...*item.FileInfo))
- func (h CSVPrinter) AddBeforePrint(f ...func(Printer, ...*item.FileInfo))
- func (h CSVPrinter) DisablePostHook()
- func (h CSVPrinter) DisablePreHook()
- func (h CSVPrinter) EnablePostHook()
- func (h CSVPrinter) EnablePreHook()
- func (c *CSVPrinter) Print(s ...*item.FileInfo)
- type CommaPrint
- func (h CommaPrint) AddAfterPrint(f ...func(Printer, ...*item.FileInfo))
- func (h CommaPrint) AddBeforePrint(f ...func(Printer, ...*item.FileInfo))
- func (h CommaPrint) DisablePostHook()
- func (h CommaPrint) DisablePreHook()
- func (h CommaPrint) EnablePostHook()
- func (h CommaPrint) EnablePreHook()
- func (c *CommaPrint) Print(items ...*item.FileInfo)
- type Content
- type FitTerminal
- func (h FitTerminal) AddAfterPrint(f ...func(Printer, ...*item.FileInfo))
- func (h FitTerminal) AddBeforePrint(f ...func(Printer, ...*item.FileInfo))
- func (h FitTerminal) DisablePostHook()
- func (h FitTerminal) DisablePreHook()
- func (h FitTerminal) EnablePostHook()
- func (h FitTerminal) EnablePreHook()
- func (f *FitTerminal) Print(i ...*item.FileInfo)
- type HTMLPrinter
- func (h HTMLPrinter) AddAfterPrint(f ...func(Printer, ...*item.FileInfo))
- func (h HTMLPrinter) AddBeforePrint(f ...func(Printer, ...*item.FileInfo))
- func (h HTMLPrinter) DisablePostHook()
- func (h HTMLPrinter) DisablePreHook()
- func (h HTMLPrinter) EnablePostHook()
- func (h HTMLPrinter) EnablePreHook()
- func (p *HTMLPrinter) Print(s ...*item.FileInfo)
- type Hook
- type ItemContent
- type JsonPrinter
- func (h JsonPrinter) AddAfterPrint(f ...func(Printer, ...*item.FileInfo))
- func (h JsonPrinter) AddBeforePrint(f ...func(Printer, ...*item.FileInfo))
- func (h JsonPrinter) DisablePostHook()
- func (h JsonPrinter) DisablePreHook()
- func (h JsonPrinter) EnablePostHook()
- func (h JsonPrinter) EnablePreHook()
- func (j *JsonPrinter) Print(items ...*item.FileInfo)
- type MDPrinter
- func (h MDPrinter) AddAfterPrint(f ...func(Printer, ...*item.FileInfo))
- func (h MDPrinter) AddBeforePrint(f ...func(Printer, ...*item.FileInfo))
- func (h MDPrinter) DisablePostHook()
- func (h MDPrinter) DisablePreHook()
- func (h MDPrinter) EnablePostHook()
- func (h MDPrinter) EnablePreHook()
- func (m *MDPrinter) Print(s ...*item.FileInfo)
- 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 NewTSVPrinter() Printer
- func NewTablePrinter(opts ...func(writer table.Writer)) Printer
- func NewZero() Printer
- type StringContent
- type TSVPrinter
- func (h TSVPrinter) AddAfterPrint(f ...func(Printer, ...*item.FileInfo))
- func (h TSVPrinter) AddBeforePrint(f ...func(Printer, ...*item.FileInfo))
- func (h TSVPrinter) DisablePostHook()
- func (h TSVPrinter) DisablePreHook()
- func (h TSVPrinter) EnablePostHook()
- func (h TSVPrinter) EnablePreHook()
- func (t *TSVPrinter) Print(s ...*item.FileInfo)
- type TablePrinter
- func (h TablePrinter) AddAfterPrint(f ...func(Printer, ...*item.FileInfo))
- func (h TablePrinter) AddBeforePrint(f ...func(Printer, ...*item.FileInfo))
- func (t *TablePrinter) AddFooter(footer string)
- func (t *TablePrinter) AddHeader(headers string)
- func (h TablePrinter) DisablePostHook()
- func (h TablePrinter) DisablePreHook()
- func (h TablePrinter) EnablePostHook()
- func (h TablePrinter) EnablePreHook()
- func (t *TablePrinter) Print(s ...*item.FileInfo)
- func (t *TablePrinter) PrintBase(fn func() string, s ...*item.FileInfo)
- func (t *TablePrinter) SetTitle(title string)
- type TreePrinter
- func (h TreePrinter) AddAfterPrint(f ...func(Printer, ...*item.FileInfo))
- func (h TreePrinter) AddBeforePrint(f ...func(Printer, ...*item.FileInfo))
- func (h TreePrinter) DisablePostHook()
- func (h TreePrinter) DisablePreHook()
- func (h TreePrinter) EnablePostHook()
- func (h TreePrinter) EnablePreHook()
- func (t *TreePrinter) Print(s ...*item.FileInfo)
- type Zero
- func (h Zero) AddAfterPrint(f ...func(Printer, ...*item.FileInfo))
- func (h Zero) AddBeforePrint(f ...func(Printer, ...*item.FileInfo))
- func (h Zero) DisablePostHook()
- func (h Zero) DisablePreHook()
- func (h Zero) EnablePostHook()
- func (h Zero) EnablePreHook()
- func (z *Zero) Print(items ...*item.FileInfo)
Constants ¶
View Source
const ( TreeUnicode TreeASCII TreeRectangle )
Variables ¶
View Source
var ( UNICODEStyle = table.StyleRounded ASCIIStyle = table.StyleDefault DefaultTBStyle = ASCIIStyle DefaultTreeStyle = TreeUnicode )
View Source
var (
CustomTermSize uint
)
View Source
var IncludeHyperlink = false
View Source
var Output io.Writer = os.Stdout
Functions ¶
func WidthNoHyperLinkLen ¶ added in v0.9.0
Types ¶
type Across ¶
func (Across) AddAfterPrint ¶
func (Across) AddBeforePrint ¶
func (Across) DisablePostHook ¶ added in v0.9.0
func (h Across) DisablePostHook()
func (Across) DisablePreHook ¶ added in v0.9.0
func (h Across) DisablePreHook()
func (Across) EnablePostHook ¶ added in v0.9.0
func (h Across) EnablePostHook()
func (Across) EnablePreHook ¶ added in v0.9.0
func (h Across) EnablePreHook()
type Byline ¶
func (Byline) AddAfterPrint ¶
func (Byline) AddBeforePrint ¶
func (Byline) DisablePostHook ¶ added in v0.9.0
func (h Byline) DisablePostHook()
func (Byline) DisablePreHook ¶ added in v0.9.0
func (h Byline) DisablePreHook()
func (Byline) EnablePostHook ¶ added in v0.9.0
func (h Byline) EnablePostHook()
func (Byline) EnablePreHook ¶ added in v0.9.0
func (h Byline) EnablePreHook()
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) DisablePostHook ¶ added in v0.9.0
func (h CSVPrinter) DisablePostHook()
func (CSVPrinter) DisablePreHook ¶ added in v0.9.0
func (h CSVPrinter) DisablePreHook()
func (CSVPrinter) EnablePostHook ¶ added in v0.9.0
func (h CSVPrinter) EnablePostHook()
func (CSVPrinter) EnablePreHook ¶ added in v0.9.0
func (h CSVPrinter) EnablePreHook()
func (*CSVPrinter) Print ¶ added in v0.8.0
func (c *CSVPrinter) Print(s ...*item.FileInfo)
type CommaPrint ¶
type CommaPrint struct { *Across // contains filtered or unexported fields }
func (CommaPrint) AddAfterPrint ¶
func (CommaPrint) AddBeforePrint ¶
func (CommaPrint) DisablePostHook ¶ added in v0.9.0
func (h CommaPrint) DisablePostHook()
func (CommaPrint) DisablePreHook ¶ added in v0.9.0
func (h CommaPrint) DisablePreHook()
func (CommaPrint) EnablePostHook ¶ added in v0.9.0
func (h CommaPrint) EnablePostHook()
func (CommaPrint) EnablePreHook ¶ added in v0.9.0
func (h CommaPrint) EnablePreHook()
func (*CommaPrint) Print ¶
func (c *CommaPrint) Print(items ...*item.FileInfo)
type FitTerminal ¶
func (FitTerminal) AddAfterPrint ¶
func (FitTerminal) AddBeforePrint ¶
func (FitTerminal) DisablePostHook ¶ added in v0.9.0
func (h FitTerminal) DisablePostHook()
func (FitTerminal) DisablePreHook ¶ added in v0.9.0
func (h FitTerminal) DisablePreHook()
func (FitTerminal) EnablePostHook ¶ added in v0.9.0
func (h FitTerminal) EnablePostHook()
func (FitTerminal) EnablePreHook ¶ added in v0.9.0
func (h FitTerminal) EnablePreHook()
func (*FitTerminal) Print ¶
func (f *FitTerminal) Print(i ...*item.FileInfo)
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) DisablePostHook ¶ added in v0.9.0
func (h HTMLPrinter) DisablePostHook()
func (HTMLPrinter) DisablePreHook ¶ added in v0.9.0
func (h HTMLPrinter) DisablePreHook()
func (HTMLPrinter) EnablePostHook ¶ added in v0.9.0
func (h HTMLPrinter) EnablePostHook()
func (HTMLPrinter) EnablePreHook ¶ added in v0.9.0
func (h HTMLPrinter) EnablePreHook()
func (*HTMLPrinter) Print ¶ added in v0.8.0
func (p *HTMLPrinter) Print(s ...*item.FileInfo)
type ItemContent ¶
func (*ItemContent) AddPrefix ¶ added in v0.9.0
func (i *ItemContent) AddPrefix(add string)
func (*ItemContent) AddSuffix ¶ added in v0.9.0
func (i *ItemContent) AddSuffix(add string)
func (*ItemContent) NO ¶ added in v0.9.0
func (i *ItemContent) NO() int
func (*ItemContent) SetPrefix ¶ added in v0.9.0
func (i *ItemContent) SetPrefix(s string)
func (*ItemContent) SetSuffix ¶ added in v0.9.0
func (i *ItemContent) SetSuffix(s string)
func (*ItemContent) String ¶ added in v0.9.0
func (i *ItemContent) String() string
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) DisablePostHook ¶ added in v0.9.0
func (h JsonPrinter) DisablePostHook()
func (JsonPrinter) DisablePreHook ¶ added in v0.9.0
func (h JsonPrinter) DisablePreHook()
func (JsonPrinter) EnablePostHook ¶ added in v0.9.0
func (h JsonPrinter) EnablePostHook()
func (JsonPrinter) EnablePreHook ¶ added in v0.9.0
func (h JsonPrinter) EnablePreHook()
func (*JsonPrinter) Print ¶ added in v0.8.0
func (j *JsonPrinter) Print(items ...*item.FileInfo)
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) DisablePostHook ¶ added in v0.9.0
func (h MDPrinter) DisablePostHook()
func (MDPrinter) DisablePreHook ¶ added in v0.9.0
func (h MDPrinter) DisablePreHook()
func (MDPrinter) EnablePostHook ¶ added in v0.9.0
func (h MDPrinter) EnablePostHook()
func (MDPrinter) EnablePreHook ¶ added in v0.9.0
func (h MDPrinter) EnablePreHook()
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 NewTSVPrinter ¶ added in v0.18.0
func NewTSVPrinter() Printer
func NewTablePrinter ¶ added in v0.8.0
type StringContent ¶
type StringContent string
func (StringContent) String ¶
func (s StringContent) String() string
type TSVPrinter ¶ added in v0.18.0
type TSVPrinter struct {
*TablePrinter
}
func (TSVPrinter) AddAfterPrint ¶ added in v0.18.0
func (TSVPrinter) AddBeforePrint ¶ added in v0.18.0
func (TSVPrinter) DisablePostHook ¶ added in v0.18.0
func (h TSVPrinter) DisablePostHook()
func (TSVPrinter) DisablePreHook ¶ added in v0.18.0
func (h TSVPrinter) DisablePreHook()
func (TSVPrinter) EnablePostHook ¶ added in v0.18.0
func (h TSVPrinter) EnablePostHook()
func (TSVPrinter) EnablePreHook ¶ added in v0.18.0
func (h TSVPrinter) EnablePreHook()
func (*TSVPrinter) Print ¶ added in v0.18.0
func (t *TSVPrinter) Print(s ...*item.FileInfo)
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) DisablePostHook ¶ added in v0.9.0
func (h TablePrinter) DisablePostHook()
func (TablePrinter) DisablePreHook ¶ added in v0.9.0
func (h TablePrinter) DisablePreHook()
func (TablePrinter) EnablePostHook ¶ added in v0.9.0
func (h TablePrinter) EnablePostHook()
func (TablePrinter) EnablePreHook ¶ added in v0.9.0
func (h TablePrinter) EnablePreHook()
func (*TablePrinter) Print ¶ added in v0.8.0
func (t *TablePrinter) Print(s ...*item.FileInfo)
func (*TablePrinter) PrintBase ¶ added in v0.8.0
func (t *TablePrinter) PrintBase(fn func() string, s ...*item.FileInfo)
func (*TablePrinter) SetTitle ¶ added in v0.8.0
func (t *TablePrinter) SetTitle(title string)
type TreePrinter ¶ added in v0.11.0
func NewTreePrinter ¶ added in v0.11.0
func NewTreePrinter() *TreePrinter
func (TreePrinter) AddAfterPrint ¶ added in v0.11.0
func (TreePrinter) AddBeforePrint ¶ added in v0.11.0
func (TreePrinter) DisablePostHook ¶ added in v0.11.0
func (h TreePrinter) DisablePostHook()
func (TreePrinter) DisablePreHook ¶ added in v0.11.0
func (h TreePrinter) DisablePreHook()
func (TreePrinter) EnablePostHook ¶ added in v0.11.0
func (h TreePrinter) EnablePostHook()
func (TreePrinter) EnablePreHook ¶ added in v0.11.0
func (h TreePrinter) EnablePreHook()
func (*TreePrinter) Print ¶ added in v0.11.0
func (t *TreePrinter) Print(s ...*item.FileInfo)
type Zero ¶
func (Zero) AddAfterPrint ¶
func (Zero) AddBeforePrint ¶
func (Zero) DisablePostHook ¶ added in v0.9.0
func (h Zero) DisablePostHook()
func (Zero) DisablePreHook ¶ added in v0.9.0
func (h Zero) DisablePreHook()
func (Zero) EnablePostHook ¶ added in v0.9.0
func (h Zero) EnablePostHook()
func (Zero) EnablePreHook ¶ added in v0.9.0
func (h Zero) EnablePreHook()
Click to show internal directories.
Click to hide internal directories.