Help us shape the future of Go! Take the 2026 Go Developer Survey

tables

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayTables added in v0.21.0

func DisplayTables(p *print.Printer, tables []Table) error

Displays multiple tables in the command's stdout

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