pretty

package
v0.0.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGreenText

func GetGreenText(text string) string

func GetRedText

func GetRedText(text string) string

func GetYellowText

func GetYellowText(text string) string

Types

type ColorFormater

type ColorFormater struct {
	Green  []string
	Yellow []string
	Red    []string
}
var BaseColorFormatter ColorFormater

func (ColorFormater) Format

func (cf ColorFormater) Format(text string) string

type DataListTable

type DataListTable struct {
	ShortHeaders      []string
	LongHeaders       []string
	HeaderLabel       map[string]string
	Items             []interface{}
	SortBy            []table.SortBy
	ColumnConfigs     []table.ColumnConfig
	Slots             map[string]func(item interface{}) interface{}
	Title             string
	StyleSeparateRows bool
}

func (*DataListTable) AddItems

func (dataTable *DataListTable) AddItems(items interface{})

func (*DataListTable) CleanItems

func (dataTable *DataListTable) CleanItems()

func (DataListTable) Print

func (dataTable DataListTable) Print(long bool)

type DataTable

type DataTable struct {
	ShortFields []Field
	LongFields  []Field
	Item        interface{}
	Slots       map[string]func(item interface{}) interface{}
	Title       string
}

func (DataTable) Print

func (dataTable DataTable) Print(long bool)

type Field

type Field struct {
	Name string
	Text string
}

Jump to

Keyboard shortcuts

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