format

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlphabeticLess

func AlphabeticLess(a, b string) bool

func NewCatagoricLess

func NewCatagoricLess(categories []string) func(a, b string) bool

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

func Summarize

func Summarize(content string, length int, clip ClipDirection) 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL