table

package
v0.0.0-...-9d2b2c6 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default(format string, data interface{}) string

func NegativeRed

func NegativeRed(format string, data interface{}) string

func PositiveRed

func PositiveRed(format string, data interface{}) string

func RedGreen

func RedGreen(format string, data interface{}) string

Types

type Data

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

type Renderer

type Renderer func(string, interface{}) string

type Row

type Row interface {
	// contains filtered or unexported methods
}

type Separator

type Separator struct {
}

type Table

type Table struct {
	Rows     []Row
	Header   Data
	Renderer map[int]Renderer
}

func NewTable

func NewTable() *Table

func (*Table) Append

func (t *Table) Append(data ...interface{})

func (*Table) AppendSeparator

func (t *Table) AppendSeparator()

func (*Table) Render

func (t *Table) Render(writer io.Writer)

func (*Table) SetHeader

func (t *Table) SetHeader(headers ...string)

Jump to

Keyboard shortcuts

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