asciitable

package
v2.4.0+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrintOptions

type PrintOptions int

type Table

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

func MakeHeadlessTable

func MakeHeadlessTable(columnCount int) Table

MakeTable creates a new instance of the table without a title, but the number of columns must be set

func MakeTable

func MakeTable(headers []string) Table

MakeTable creates a new instance of the table with a given title

func (*Table) AddRow

func (t *Table) AddRow(row []string)

func (*Table) AsBuffer

func (t *Table) AsBuffer() *bytes.Buffer

WriteTo prints the table to the given writer

func (*Table) Body

func (t *Table) Body() *bytes.Buffer

Body returns the fully formatted table body as a buffer

func (*Table) ColumnWidths

func (t *Table) ColumnWidths() []int

ColumnWidths returns the slice of ints that are the widths of each column

func (*Table) Header

func (t *Table) Header() *bytes.Buffer

Header returns the fully formatted header as a buffer

func (*Table) IsHeadless

func (t *Table) IsHeadless() bool

IsHeadless returns 'true' if none of the table title cells contains any text

Jump to

Keyboard shortcuts

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