Documentation
¶
Overview ¶
Package table is a Go library to write text tables.
Index ¶
Constants ¶
View Source
const ( VLine = '|' HLine = '-' CrossLine = '+' PadChar = ' ' AlignSign = ':' MarkdownLineBreak = "<br />" EscapeChar = '\\' BoxHorizontal = '─' BoxVirtical = '│' BoxVirticalAndHorizontal = '┼' BoxVirticalAndRIght = '├' BoxVirticalAndLeft = '┤' BoxDownAndRight = '┌' BoxDownAndLeft = '┐' BoxDownAndHorizontal = '┬' BoxUpAndRight = '└' BoxUpAndLeft = '┘' BoxUpAndHorizontal = '┴' )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DrawingCharacterSet ¶ added in v1.4.2
type DrawingCharacterSet struct {
Horizontal []byte
Virtical []byte
VirticalAndHorizontal []byte
VirticalAndRight []byte
VirticalAndLeft []byte
DownAndRight []byte
DownAndLeft []byte
DownAndHorizontal []byte
UpAndRight []byte
UpAndLeft []byte
UpAndHorizontal []byte
}
func NewBoxDrawingCharacterSet ¶ added in v1.4.2
func NewBoxDrawingCharacterSet() *DrawingCharacterSet
func NewPlainDrawingCharacterSet ¶ added in v1.4.2
func NewPlainDrawingCharacterSet() *DrawingCharacterSet
type Encoder ¶
type Encoder struct {
Format Format
LineBreak text.LineBreak
EastAsianEncoding bool
CountDiacriticalSign bool
CountFormatCode bool
Encoding text.Encoding
// Plain Table or Box Table
DrawingCharacterSet *DrawingCharacterSet
// GFM or Org Table
WithoutHeader bool
// contains filtered or unexported fields
}
func NewEncoder ¶
func (*Encoder) AppendRecord ¶
func (*Encoder) SetFieldAlignments ¶
func (e *Encoder) SetFieldAlignments(alignments []text.FieldAlignment)
Click to show internal directories.
Click to hide internal directories.