tables

package
v0.13.2-prerelease.2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Table

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

func NewTable

func NewTable() Table

Creates a new table

func (*Table) AddRow

func (t *Table) AddRow(row ...interface{})

Adds a row to the table

func (*Table) AddSeparator

func (t *Table) AddSeparator()

Adds a separator between rows

func (*Table) Display

func (t *Table) Display(p *print.Printer) error

Displays the table in the command's stdout

func (*Table) EnableAutoMergeOnColumns

func (t *Table) EnableAutoMergeOnColumns(columns ...int)

Enables auto-merging of cells with similar values in the given columns

func (*Table) Render

func (t *Table) Render() string

Returns the table rendered

func (*Table) SetHeader

func (t *Table) SetHeader(header ...interface{})

Sets the header of the table

func (*Table) SetTitle added in v0.6.0

func (t *Table) SetTitle(title string)

Sets the title of the table

Jump to

Keyboard shortcuts

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