Documentation
¶
Index ¶
- Variables
- func GetLipglossColor(col string) (lipgloss.Color, error)
- func NewCheckPrinter(opts ...checkmate.Option) *checkmate.Printer
- func NewCheckPrinterWithWriter(w io.Writer, opts ...checkmate.Option) *checkmate.Printer
- func PrintColoredMessage(out io.Writer, message, col string) error
- func RenderError(out io.Writer, friendlyMessage string, err error) error
- func RenderSuccess(out io.Writer, message string, data interface{}) error
- func StderrCheckPrinter() *checkmate.Printer
- func StdoutCheckPrinter() *checkmate.Printer
- type DefaultUIRunner
- type MockUIRunner
- type UIRunner
Constants ¶
This section is empty.
Variables ¶
var ColorMap = map[string]lipgloss.Color{ "black": lipgloss.Color("#000000"), "red": lipgloss.Color("#FF0000"), "green": lipgloss.Color("#00FF00"), "yellow": lipgloss.Color("#FFFF00"), "blue": lipgloss.Color("#0000FF"), "magenta": lipgloss.Color("#FF00FF"), "cyan": lipgloss.Color("#00FFFF"), "white": lipgloss.Color("#FFFFFF"), }
ColorMap maps color names to their lipgloss.Color values
Functions ¶
func GetLipglossColor ¶
GetLipglossColor converts a color string to a lipgloss.Color
func NewCheckPrinter ¶
NewCheckPrinter creates a new checkmate.Printer configured for this project. Use this for check-style output (validations, quality checks, build steps).
Example:
p := ui.NewCheckPrinter()
p.CategoryHeader("Code Quality")
p.CheckHeader("Running linter")
p.CheckSuccess("No issues found")
func NewCheckPrinterWithWriter ¶
NewCheckPrinterWithWriter creates a checkmate.Printer that writes to the specified writer.
func PrintColoredMessage ¶
PrintColoredMessage prints a message to the console with a specific color
func RenderError ¶
RenderError prints an error message to the writer (stderr usually) and logs the full error.
Stream 2 (Status): Prints friendly error to out Stream 3 (Audit): Logs full error with stack trace to file
func RenderSuccess ¶
RenderSuccess prints a success message to the writer (stdout) and shadows it to the log file.
Stream 1 (Data): Prints formatted message to out Stream 3 (Audit): Logs raw data to file
func StderrCheckPrinter ¶
StderrCheckPrinter returns a checkmate.Printer that writes to stderr.
func StdoutCheckPrinter ¶
StdoutCheckPrinter returns a checkmate.Printer that writes to stdout. This is a convenience for the common case.
Types ¶
type DefaultUIRunner ¶
type DefaultUIRunner struct {
// contains filtered or unexported fields
}
DefaultUIRunner is the default implementation of UIRunner
func NewDefaultUIRunner ¶
func NewDefaultUIRunner() *DefaultUIRunner
NewDefaultUIRunner creates a new DefaultUIRunner with the standard program factory
func NewTestUIRunner ¶
func NewTestUIRunner() *DefaultUIRunner
For testing only - allows creating a DefaultUIRunner with a nil program factory This simulates a successful UI run without actually creating a tea.Program
func (*DefaultUIRunner) RunUI ¶
func (d *DefaultUIRunner) RunUI(message, col string) error
RunUI runs the Bubble Tea UI
type MockUIRunner ¶
MockUIRunner is a mock implementation of the UIRunner interface for testing
func (*MockUIRunner) RunUI ¶
func (m *MockUIRunner) RunUI(message, col string) error