table

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MPL-2.0, MIT Imports: 6 Imported by: 0 modules, 0 packages

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

Overview

Package table outputs data in a table format. The package is heavily inspired by github.com/gosuri/uitable.

Package table outputs data in a table format. The package is heavily inspired by github.com/gosuri/uitable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MarkdownTable

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

MarkdownTable represents a decorator that renders the data in formatted in a table.

func (*MarkdownTable) AddRow

func (t *MarkdownTable) AddRow(data ...interface{}) *MarkdownTable

AddRow adds a new row to the table.

func (*MarkdownTable) String

func (t *MarkdownTable) String() string

String returns the string value of table.

type Table

type Table struct {
	// LineLength is the maximum allowed length of a line in the Table
	LineLength uint

	// Wrap when set to true wraps the contents of the columns when the length exceeds the MaxColWidth
	Wrap bool

	// SeparatorSpaces is the number of spaces between columns
	SeparatorSpaces uint

	// HeaderFormatter is a function that formats the header of the table
	HeaderFormatter func(input string) string

	// FirstColumnFormatter is a function that formats the first column of the table
	FirstColumnFormatter func(input string) string
	// contains filtered or unexported fields
}

Table represents a decorator that renders the data in formatted in a table.

func (*Table) AddRow

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

AddRow adds a new row to the table.

func (*Table) String

func (t *Table) String() string

String returns the string value of table.

Jump to

Keyboard shortcuts

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