lib_formatter_table

package
v0.0.0-20240423 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NAME = "table"

	OPTION_WRITER     = "writer"
	OPTION_COLUMNS    = "columns"
	OPTION_COLUMN_LUT = "columnLut"
	OPTION_TRANSLATES = "translates"
)

Variables

View Source
var (
	WithWriter, GetWriter         = option.New[io.Writer](OPTION_WRITER)
	WithColumns, GetColumns       = option.New[[]string](OPTION_COLUMNS)
	WithColumnLut, GetColumnLut   = option.New[map[string]string](OPTION_COLUMN_LUT)
	WithTranslates, GetTranslates = option.New[map[string]func(any) (string, error)](OPTION_TRANSLATES)
)

Functions

Types

type NewTableFormatterOption

type NewTableFormatterOption = option.ApplyOption

type TableFormatter

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

func (*TableFormatter) FormatSlice

func (f *TableFormatter) FormatSlice(ctx context.Context, xs []any) error

Jump to

Keyboard shortcuts

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