renderers

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRecords

func BuildRecords(items []any) ([]string, []map[string]any, error)

func RecordItem

func RecordItem(item any) ([]string, map[string]any, error)

func StringifyCell

func StringifyCell(value any) string

Types

type Renderer

type Renderer interface {
	Render(w io.Writer, items []any, opts ...RendererOptFunc) error
}

type RendererOptFunc

type RendererOptFunc func(*RendererOption)

func SingleElemAndComposeOption

func SingleElemAndComposeOption() RendererOptFunc

type RendererOption

type RendererOption struct {
	// only render 0th index element and make it composed into column.
	// useful when there is only one element and we need to render object.
	SingleElemAndCompose bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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