Documentation ¶
Index ¶
- Variables
- func WidthLen(str string) int
- type Across
- type Byline
- type CommaPrint
- type Content
- type FitTerminal
- 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) 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 Printer
- type StringContent
- type Zero
Constants ¶
This section is empty.
Variables ¶
View Source
var Output io.Writer = os.Stdout
Functions ¶
Types ¶
type Across ¶
func (Across) AddAfterPrint ¶
func (h Across) AddAfterPrint(f ...func(...Item))
func (Across) AddBeforePrint ¶
func (h Across) AddBeforePrint(f ...func(...Item))
type Byline ¶
func (Byline) AddAfterPrint ¶
func (h Byline) AddAfterPrint(f ...func(...Item))
func (Byline) AddBeforePrint ¶
func (h Byline) AddBeforePrint(f ...func(...Item))
type CommaPrint ¶
type CommaPrint struct { *Across // contains filtered or unexported fields }
func (CommaPrint) AddAfterPrint ¶
func (h CommaPrint) AddAfterPrint(f ...func(...Item))
func (CommaPrint) AddBeforePrint ¶
func (h CommaPrint) AddBeforePrint(f ...func(...Item))
func (*CommaPrint) Print ¶
func (c *CommaPrint) Print(items ...Item)
type FitTerminal ¶
func (FitTerminal) AddAfterPrint ¶
func (h FitTerminal) AddAfterPrint(f ...func(...Item))
func (FitTerminal) AddBeforePrint ¶
func (h FitTerminal) AddBeforePrint(f ...func(...Item))
func (*FitTerminal) Print ¶
func (f *FitTerminal) Print(i ...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) 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 Printer ¶
func NewCommaPrint ¶
func NewCommaPrint() Printer
func NewFitTerminal ¶
func NewFitTerminal() Printer
type StringContent ¶
type StringContent string
func (StringContent) String ¶
func (s StringContent) String() string
Click to show internal directories.
Click to hide internal directories.