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 ¶
func NewTableFormatter ¶
func NewTableFormatter(opts ...NewTableFormatterOption) (lib_formatter_interface.Formatter, error)
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
Click to show internal directories.
Click to hide internal directories.