tablewriter

package
v1.31.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0, MIT Imports: 5 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Name         string
	SeparateLine bool
	Lines        int
	RightAlign   bool
}

func Col

func Col(name string, opts ...ColumnOption) Column

func NewLineCol

func NewLineCol(name string) Column

type ColumnOption added in v1.31.1

type ColumnOption func(*columnCfg)

func RightAlign added in v1.31.1

func RightAlign() ColumnOption

type TableOption added in v1.31.1

type TableOption func(*tableCfg)

func WithBorders added in v1.31.1

func WithBorders() TableOption

type TableWriter

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

func New

func New(cols ...Column) *TableWriter

New creates a new TableWriter. Unlike text/tabwriter, this works with CLI escape codes, and allows for info

in separate lines

func (*TableWriter) Flush

func (w *TableWriter) Flush(out io.Writer, opts ...TableOption) error

func (*TableWriter) Write

func (w *TableWriter) Write(r map[string]interface{})

Jump to

Keyboard shortcuts

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