render

package
v0.0.0-...-ab5910b Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package render provides styled and markdown output rendering for the Fizzy CLI. The shared output.Writer falls back to JSON for FormatStyled/FormatMarkdown; this package supplies the app-specific rendering.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarkdownDetail

func MarkdownDetail(data map[string]any, summary string) string

MarkdownDetail renders a single map as bold-label: value pairs.

func MarkdownList

func MarkdownList(data []map[string]any, cols Columns, summary string) string

MarkdownList renders a slice of maps as a GFM table.

func MarkdownSummary

func MarkdownSummary(data map[string]any, summary string) string

MarkdownSummary renders a single-line summary message for mutations.

func StyledDetail

func StyledDetail(data map[string]any, summary string) string

StyledDetail renders a single map as styled key-value pairs.

func StyledList

func StyledList(data []map[string]any, cols Columns, summary string) string

StyledList renders a slice of maps as a styled terminal table.

func StyledSummary

func StyledSummary(data map[string]any, summary string) string

StyledSummary renders a single-line summary message for mutations.

Types

type Column

type Column struct {
	Header string
	Field  string
}

Column maps a display header to a JSON field name.

type Columns

type Columns []Column

Columns is a slice of Column specs for table rendering.

Jump to

Keyboard shortcuts

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