printer

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TableAlignLeft  = tablewriter.ALIGN_LEFT
	TableAlignRight = tablewriter.ALIGN_RIGHT
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Custom

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

func NewCustom

func NewCustom(w io.Writer) *Custom

func (*Custom) Overwrite

func (t *Custom) Overwrite(v string)

func (*Custom) Print

func (t *Custom) Print(v string)

type Format

type Format string
const (
	FormatJSON  Format = "json"
	FormatTable Format = "table"
)

type JSON

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

func NewJSON

func NewJSON(w io.Writer) *JSON

func NewJSONIndented

func NewJSONIndented(w io.Writer, i int) *JSON

func (*JSON) Print

func (j *JSON) Print(v interface{}) error

type Table

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

func NewTable

func NewTable(w io.Writer, columns []TableColumn) *Table

func (*Table) AppendRow

func (t *Table) AppendRow(row TableRow)

func (*Table) AppendRows

func (t *Table) AppendRows(rows []TableRow)

func (*Table) ClearRows

func (t *Table) ClearRows()

func (*Table) Overwrite

func (t *Table) Overwrite(rows []TableRow)

func (*Table) Print

func (t *Table) Print() error

func (*Table) ReplaceRows

func (t *Table) ReplaceRows(rows []TableRow)

func (*Table) Rewrite

func (t *Table) Rewrite()

type TableAlignment

type TableAlignment int

type TableColumn

type TableColumn struct {
	Header    string
	Alignment TableAlignment
}

type TableRow

type TableRow []string

Jump to

Keyboard shortcuts

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