table

package module
v0.0.0-...-1be6f01 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: MIT Imports: 4 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTML

type HTML struct {
	DisableHeader bool
}

func (HTML) Print

func (html HTML) Print(w io.Writer, table *Table) error

type Markdown

type Markdown struct {
	DisableHeader     bool
	DisableHeaderLine bool
}

func (Markdown) Print

func (md Markdown) Print(w io.Writer, table *Table) error

type Row

type Row []any

type Rows

type Rows []Row

type Table

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

func (*Table) AddRow

func (table *Table) AddRow(row Row) error

func (*Table) Columns

func (table *Table) Columns() ([]string, error)

func (*Table) MaxColumnWidth

func (table *Table) MaxColumnWidth() (int, error)

MaxColumnWidth returns the size of the widest column.

func (*Table) QuickRow

func (table *Table) QuickRow(x ...any) error

func (*Table) Rows

func (table *Table) Rows() (Rows, error)

func (*Table) SetColumns

func (table *Table) SetColumns(s ...string) error

SetColumns sets the names of the columns. Once set, the columns cannot be changed. Once set, rows will be constrained to the number of columns.

Jump to

Keyboard shortcuts

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