tablewriter

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2020 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 TableWriter

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

TableWriter render the data as table-like format.

func NewTableWriter

func NewTableWriter(w io.Writer) *TableWriter

NewTableWriter return a new table writer.

func (*TableWriter) Append

func (t *TableWriter) Append(row []string)

Append append the row.

func (*TableWriter) AppendBulk

func (t *TableWriter) AppendBulk(rows [][]string)

AppendBulk append the rows.

func (*TableWriter) Render

func (t *TableWriter) Render() error

Render write the table.

func (*TableWriter) SetColumnWidths

func (t *TableWriter) SetColumnWidths(widths []int)

SetColumnWidths set the width of columns. If the size of value is over the width, it mosaic with "...".

func (*TableWriter) SetColumns

func (t *TableWriter) SetColumns(cols []string)

SetColumns set columns of table at the header.

func (*TableWriter) SetHeaderBorder

func (t *TableWriter) SetHeaderBorder(ok bool)

SetHeaderBorder set the border of the header.

Jump to

Keyboard shortcuts

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