tables

package
v0.1.0-beta-test-sign-key Latest Latest
Warning

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

Go to latest
Published: Feb 28, 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(cmd *cobra.Command) 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

Jump to

Keyboard shortcuts

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