tabular

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Reset = "\x1b[0m"

Variables

This section is empty.

Functions

This section is empty.

Types

type TabularAppIface

type TabularAppIface interface {
	WorkDir() string
	TermWidth() (int, error)
	Abs(path string) (string, error)
	UserHomeDir() (string, error)
	Dir(path string) string
	Join(elem ...string) string
	SplitAll(path string) []string
	JoinColor(color string, reset string, elem ...string) string
}

type TabularFormatter

type TabularFormatter struct {
	// contains filtered or unexported fields
}

func New

func (*TabularFormatter) DefaultTimeStyle

func (*TabularFormatter) DefaultTimeStyle() string

func (*TabularFormatter) FileError

func (f *TabularFormatter) FileError(w io.Writer, err error, path string)

func (*TabularFormatter) FolderHeader

func (f *TabularFormatter) FolderHeader(w io.Writer, path string, itemCount int)

func (*TabularFormatter) FolderTail

func (*TabularFormatter) FolderTail(w io.Writer, path string)

func (*TabularFormatter) FormatItem

func (*TabularFormatter) FormatItem(tableObj *table.Table, item any) ([]string, error)

func (*TabularFormatter) FormatValue

func (*TabularFormatter) FormatValue(colName string, value string) (string, error)

func (*TabularFormatter) LinkTargetSep

func (*TabularFormatter) LinkTargetSep() string

func (*TabularFormatter) LongLinkTarget

func (*TabularFormatter) LongLinkTarget() bool

func (*TabularFormatter) LongSet

func (*TabularFormatter) LongSet(cols map[string]bool)

func (*TabularFormatter) PrintError

func (f *TabularFormatter) PrintError(w io.Writer, err error)

func (*TabularFormatter) PrintItems

func (f *TabularFormatter) PrintItems(w io.Writer, tableObj *table.Table, items iface.FormattedItemList) error

func (*TabularFormatter) SizeFormat

func (f *TabularFormatter) SizeFormat() SizeFormat

func (*TabularFormatter) TableHeader

func (f *TabularFormatter) TableHeader(w io.Writer, tableObj *table.Table)

Jump to

Keyboard shortcuts

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