Documentation ¶
Index ¶
- Variables
- func AlphabeticLess(a, b string) bool
- func NewCatagoricLess(categories []string) func(a, b string) bool
- func PrettyPrintMap[K comparable, V any](m map[K]V) string
- func PrettyPrintMapOrdered[K comparable, V any](m map[K]V, orderedKeys []K) string
- func Summarize(content string, length int, clip ClipDirection) string
- type ClipDirection
- type Table
- type TableCharacter
- type TableWriter
Constants ¶
This section is empty.
Variables ¶
View Source
var ASCIICharMap = map[TableCharacter]string{ HLINE: "-", VLINE: "|", MIDLLINE: "|", MIDRLINE: "|", TLCORNER: " ", TRCORNER: " ", BLCORNER: " ", BRCORNER: " ", }
View Source
var PrettyCharMap = map[TableCharacter]string{ HLINE: "\u2500", VLINE: "\u2502", MIDLLINE: "\u251C", MIDRLINE: "\u2524", TLCORNER: "\u250C", TRCORNER: "\u2510", BLCORNER: "\u2514", BRCORNER: "\u2518", }
View Source
var PrettyCharMapRoundedCorners = map[TableCharacter]string{ HLINE: PrettyCharMap[HLINE], VLINE: PrettyCharMap[VLINE], MIDLLINE: PrettyCharMap[MIDLLINE], MIDRLINE: PrettyCharMap[MIDRLINE], TLCORNER: "\u256D", TRCORNER: "\u256E", BLCORNER: "\u2570", BRCORNER: "\u256F", }
Functions ¶
func AlphabeticLess ¶
func NewCatagoricLess ¶
func PrettyPrintMap ¶
func PrettyPrintMap[K comparable, V any](m map[K]V) string
func PrettyPrintMapOrdered ¶
func PrettyPrintMapOrdered[K comparable, V any](m map[K]V, orderedKeys []K) string
Types ¶
type ClipDirection ¶
type ClipDirection int
const ( ClipLeft ClipDirection = iota ClipRight ClipMiddle )
type TableCharacter ¶
type TableCharacter int
const ( HLINE TableCharacter = iota VLINE MIDLLINE MIDRLINE TLCORNER TRCORNER BLCORNER BRCORNER )
type TableWriter ¶
func NewTableWriter ¶
func NewTableWriter(t *Table) *TableWriter
func (*TableWriter) WithCharMap ¶
func (w *TableWriter) WithCharMap(m map[TableCharacter]string) *TableWriter
func (*TableWriter) WithTable ¶
func (w *TableWriter) WithTable(t *Table) *TableWriter
Click to show internal directories.
Click to hide internal directories.