Documentation
¶
Index ¶
- Constants
- type Base
- func (b *Base) Buffer() *bytes.Buffer
- func (b *Base) InitBuffer()
- func (b *Base) Print()
- func (b *Base) Println()
- func (b *Base) SetBuffer(buf *bytes.Buffer)
- func (b *Base) SetErr(err error)
- func (b *Base) SetOutput(out io.Writer)
- func (b *Base) String() string
- func (b *Base) WriteTo(w io.Writer) (int64, error)
- type FormatFunc
- type Formatter
- type OverflowFlag
- type PosFlag
- type ShownFace
Constants ¶
View Source
const ( // OK success exit code OK = 0 // ERR error exit code ERR = 2 )
View Source
const PosCenter = PosMiddle
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct {
// out comdef.ByteStringWriter
// TODO lock sync.Mutex
Out io.Writer
// Buf store formatted string
Buf *bytes.Buffer
Err error
// FormatFn function
FormatFn FormatFunc
// contains filtered or unexported fields
}
Base formatter. NOTE: must config the FormatFn before use
type FormatFunc ¶
type FormatFunc func()
type OverflowFlag ¶
type OverflowFlag uint8
OverflowFlag for handling content overflow. 0=auto, 1=cut, 2=wrap
const ( OverflowAuto OverflowFlag = iota // auto OverflowCut // 截断 OverflowWrap // 换行 )
OverflowFlag values
Click to show internal directories.
Click to hide internal directories.