table

package
v0.0.0-...-af55a85 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildRowFunc

type BuildRowFunc func(obj interface{}) Row

type Cell

type Cell struct {
	Value      string
	Attributes []color.Attribute
}

func NewCell

func NewCell(value string, attributes ...color.Attribute) Cell

func (Cell) String

func (cell Cell) String() string

type ColoredTableWriter

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

func NewStyleWriter

func NewStyleWriter(writer io.Writer) *ColoredTableWriter

func (*ColoredTableWriter) AddHeader

func (c *ColoredTableWriter) AddHeader(names ...string)

func (*ColoredTableWriter) AddRow

func (c *ColoredTableWriter) AddRow(obj interface{})

func (*ColoredTableWriter) Flush

func (c *ColoredTableWriter) Flush()

func (*ColoredTableWriter) SetAddRowFunc

func (c *ColoredTableWriter) SetAddRowFunc(f func(obj interface{}) Row)

type Row

type Row struct {
	Cells []Cell
}

Jump to

Keyboard shortcuts

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