Documentation ¶
Overview ¶
Package textformatter is the yaff Text formatter.
Index ¶
Constants ¶
View Source
const Text = yaff.Format("text")
Text format.
Variables ¶
This section is empty.
Functions ¶
func NewFormatter ¶
NewFormatter return a new formatter.
Types ¶
type Options ¶
type Options struct { Style TableStyle ExcludeHeader bool ColumnSeparator string ColumnSet map[string]bool ExcludeSet map[string]bool // TerminalWidth is the width oth the terminal the aligned text is being output to // if this is 0 no wrapping will be used. For values > column min width this value will // be used to wrap text. TerminalWidth int }
Options for the JSON formatter.
type TableStyle ¶
type TableStyle int
TableStyle is the style of the output table.
const ( // Plain text. Plain TableStyle = iota // Aligned in columns. Aligned // Grid surrounding. Grid // Markdown uses a markdown table format. Markdown )
func GetTextStyleFromString ¶
func GetTextStyleFromString(style string) (TableStyle, error)
GetTextStyleFromString get the text style for a string.
Click to show internal directories.
Click to hide internal directories.