table

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderTable

func RenderTable(out io.Writer, headers []string, rows [][]string) error

RenderTable is a convenience function to render a simple table.

Types

type Writer

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

Writer is a wrapper around Charm's table that provides a similar interface to tablewriter.

func NewWriter

func NewWriter(out io.Writer) *Writer

NewWriter creates a new table writer.

func (*Writer) Append

func (w *Writer) Append(row []string) error

Append adds a row to the table.

func (*Writer) Header

func (w *Writer) Header(headers []string)

Header is an alias to SetHeader for compatibility with tablewriter.

func (*Writer) Render

func (w *Writer) Render() error

Render prints the table to the writer.

func (*Writer) SetHeader

func (w *Writer) SetHeader(headers []string)

Header sets the table headers.

Jump to

Keyboard shortcuts

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