Documentation ¶
Index ¶
- 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 SortableMatrix
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 SortableMatrix ¶ added in v0.6.1
type SortableMatrix struct {
// contains filtered or unexported fields
}
func NewSortableMatrix ¶ added in v0.6.1
func NewSortableMatrix(data [][]string, sortColIdx int, sortFunc func(a, b string) bool) *SortableMatrix
func (*SortableMatrix) Append ¶ added in v0.6.1
func (m *SortableMatrix) Append(row []string)
func (*SortableMatrix) Len ¶ added in v0.6.1
func (m *SortableMatrix) Len() int
func (*SortableMatrix) Less ¶ added in v0.6.1
func (m *SortableMatrix) Less(i, j int) bool
func (*SortableMatrix) Matrix ¶ added in v0.6.1
func (m *SortableMatrix) Matrix() [][]string
func (*SortableMatrix) Swap ¶ added in v0.6.1
func (m *SortableMatrix) Swap(i, j int)
func (*SortableMatrix) Table ¶ added in v0.6.1
func (m *SortableMatrix) Table(w io.Writer, header []string) *tablewriter.Table
Click to show internal directories.
Click to hide internal directories.