Documentation
¶
Overview ¶
Package presentation handles all UI and formatting logic.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorConfig ¶
type ErrorConfig struct {
Format ErrorFormat
WrapWidth int
}
ErrorConfig configures the error formatter.
type ErrorFormat ¶
type ErrorFormat string
ErrorFormat represents the output format for errors.
const ( // ErrorFormatText formats errors as plain text. ErrorFormatText ErrorFormat = "text" // ErrorFormatJSON formats errors as JSON. ErrorFormatJSON ErrorFormat = "json" )
type ErrorFormatter ¶
type ErrorFormatter struct {
// contains filtered or unexported fields
}
ErrorFormatter handles error message formatting.
func NewErrorFormatter ¶
func NewErrorFormatter(config ErrorConfig) *ErrorFormatter
NewErrorFormatter creates a new error formatter.
func (*ErrorFormatter) FormatErrors ¶
func (f *ErrorFormatter) FormatErrors(errors []results.ErrorDetail) (string, error)
FormatErrors formats error details based on the configured format.
func (*ErrorFormatter) FormatSummary ¶
func (f *ErrorFormatter) FormatSummary(summary results.Summary) string
FormatSummary formats a summary message.
type HeaderConfig ¶
HeaderConfig defines the configuration for a table header column.
type TableConfig ¶
TableConfig configures the table formatter.
type TableFormatter ¶
type TableFormatter struct {
// contains filtered or unexported fields
}
TableFormatter handles table rendering for results.
func NewTableFormatter ¶
func NewTableFormatter(config TableConfig) *TableFormatter
NewTableFormatter creates a new table formatter.
func (*TableFormatter) RenderResults ¶
func (f *TableFormatter) RenderResults(results []runner.Result) string
RenderResults renders a collection of results as formatted tables split by status.