printer

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fprint

func Fprint(w io.Writer, table Table) error

Fprint prints the table to a writer.

func Print

func Print(table Table) error

Print prints the table to stdout. It pipes to less (or more for windows) if height of table is higher than terminal's.

Types

type Table

type Table struct {
	Header []string   // Column titles
	Body   [][]string // Rows data
}

Table is the table to print.

func (Table) Empty

func (t Table) Empty() bool

Empty checks if the table is empty.

Jump to

Keyboard shortcuts

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