Documentation
¶
Overview ¶
Package ui provides a unified interface for rendering output in different formats. It supports terminal (rich), text (plain), and JSON output formats.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Format ¶
type Format int
Format represents the output format type
const ( // FormatAuto automatically detects the appropriate format based on terminal capabilities FormatAuto Format = iota // FormatTerminal renders rich terminal output with colors and styling FormatTerminal // FormatText renders plain text output without any styling FormatText // FormatJSON renders machine-readable JSON output FormatJSON )
func DetectFormat ¶
DetectFormat determines the appropriate output format based on environment and terminal capabilities
func ParseFormat ¶
ParseFormat parses a string into a Format value
type Renderer ¶
type Renderer interface {
// RenderResult renders any result type (command results, execution contexts, etc.)
RenderResult(result interface{}) error
// RenderError renders an error with appropriate formatting
RenderError(err error) error
// RenderMessage renders a simple message
RenderMessage(msg string) error
}
Renderer is the common interface for all output renderers. It provides methods for rendering different types of data and messages.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package format provides formatting utilities for UI presentation.
|
Package format provides formatting utilities for UI presentation. |
|
Package json provides machine-readable JSON output
|
Package json provides machine-readable JSON output |
|
Package lipbalm provides a simple template engine for rich terminal rendering.
|
Package lipbalm provides a simple template engine for rich terminal rendering. |
|
Package output implements a declarative, template-based rendering system for dodot's command-line interface.
|
Package output implements a declarative, template-based rendering system for dodot's command-line interface. |
|
styles
Package styles defines the visual styling for dodot's terminal output.
|
Package styles defines the visual styling for dodot's terminal output. |
|
Package terminal provides rich terminal output with colors and styling
|
Package terminal provides rich terminal output with colors and styling |
|
Package text provides plain text output without any styling
|
Package text provides plain text output without any styling |
Click to show internal directories.
Click to hide internal directories.