Documentation
¶
Index ¶
- func Image(options ...Opt) *imageFormatter
- func MarkdownFormatter(options ...Opt) *markdown
- func Progress(options ...Opt) *progress
- func TableFor[T TableRow](options ...Opt) *table[T]
- func TableSummary(name string, count uint, bodyLen uint, offset uint64, limit *uint64) *summary
- type CellText
- type Markdown
- type Opt
- type TableRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Image ¶ added in v1.7.17
func Image(options ...Opt) *imageFormatter
Image returns a formatter which writes images to a terminal, to fit its width and height, which are characters: as pixels, with the graphics protocols of the terminals which have one, such as kitty's and iTerm2's, or else as characters, two pixels to a character, in colour. The protocol is chosen from the terminal's environment variables.
func MarkdownFormatter ¶ added in v1.7.11
func MarkdownFormatter(options ...Opt) *markdown
MarkdownFormatter returns a formatter which renders markdown documents. The style is chosen based on whether stdout is a terminal, and its background color.
Types ¶
type CellText ¶ added in v1.7.11
type CellText any
CellText is the value of a table cell, which is either a string or Markdown. Other values are formatted with fmt.Sprint.
type Markdown ¶ added in v1.7.11
type Markdown string
Markdown is text which is rendered as markdown, for example as a table cell