Help us shape the future of Go! Take the 2026 Go Developer Survey

renderer

package
v1.233.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option added in v1.225.0

type Option func(*Renderer)

Option customizes optional renderer behavior.

func WithTableOptions added in v1.225.0

func WithTableOptions(tableOptions format.TableOptions) Option

WithTableOptions overrides styled-table behavior (e.g. disabling semantic cell coloring for tables whose values are plain data rather than statuses).

type Renderer

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

Renderer orchestrates the complete list rendering pipeline. Pipeline: data → filter → column selection → sort → format → output.

func New

func New(
	filters []filter.Filter,
	selector *column.Selector,
	sorters []*sort.Sorter,
	fmt format.Format,
	delimiter string,
	opts ...Option,
) *Renderer

New creates a renderer with optional components.

func (*Renderer) Render

func (r *Renderer) Render(data []map[string]any) error

Render executes the full pipeline and writes output.

func (*Renderer) RenderToString added in v1.205.0

func (r *Renderer) RenderToString(data []map[string]any) (string, error)

RenderToString executes the full pipeline and returns formatted output. This is useful when the caller needs to process the output (e.g., pass to pager).

Jump to

Keyboard shortcuts

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