Documentation
¶
Index ¶
- Constants
- Variables
- func CenterText(text string) string
- func PrintError(message string)
- func PrintHighlight(text string)
- func PrintInfo(label, value string)
- func PrintLogo()
- func PrintMetadata(label, value string)
- func PrintServiceLog(serviceName, logLine string)
- func PrintSuccess(message string)
- func PrintWarning(message string)
- func RenderTable(table *Table) string
- func StyleServiceName(serviceName string) string
- func StyleStatusValue(status string) string
- func TerminalWidth() int
- type Table
Constants ¶
View Source
const ( SuccessSymbol = "✓" ErrorSymbol = "✗" InfoSymbol = "ℹ" WarningSymbol = "⚠" BulletSymbol = "•" ArrowRightSymbol = "→" ArrowLeftSymbol = "←" CheckmarkSymbol = "✓" StartSymbol = "○" EndSymbol = "●" LoadingDots = "..." )
Enhanced symbols with consistent appearance.
View Source
const CommandPrompt = "❯"
Command prompt symbol.
Variables ¶
View Source
var ( // Primary colors. PrimaryColor = "#7C3AED" // Vibrant purple SecondaryColor = "#2563EB" // Deep blue TertiaryColor = "#10B981" // Emerald green // Status colors. SuccessColor = "#10B981" // Emerald green ErrorColor = "#EF4444" // Red WarningColor = "#F59E0B" // Amber InfoColor = "#3B82F6" // Blue RunningColor = "#10B981" // Green for running status StoppedColor = "#6B7280" // Gray for stopped status PendingColor = "#F59E0B" // Amber for pending status UnloadedColor = "#9CA3AF" // Light gray for unloaded status // Text colors. HeaderColor = "#F9FAFB" // Near white TextColor = "#E5E7EB" // Light gray DimTextColor = "#9CA3AF" // Dimmed gray SubtleColor = "#6B7280" // Very dim gray LinkColor = "#60A5FA" // Light blue for links/actions AccentColor = "#8B5CF6" // For backward compatibility SelectColor = "#FFFFFF" // For backward compatibility // Border and accents. BorderColor = "#374151" // Dark gray border HighlightColor = "#8B5CF6" // Bright purple for highlights SelectionColor = "#1F2937" // Dark blue-gray for selections BackgroundAccent = "#111827" // Near black with blue tint AlternatingRowDark = "#1F2937" // Slightly lighter than background )
View Source
var ( // Base styles. BaseStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color(TextColor)). Padding(0, 0, 1, 2) HeaderStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color(HeaderColor)). Bold(true) // Semantic styles. SuccessStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color(SuccessColor)) ErrorStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color(ErrorColor)) WarningStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color(WarningColor)) InfoStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color(InfoColor)) DimStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color(DimTextColor)) LinkStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color(LinkColor)). Underline(true) // For backwards compatibility. Highlight = lipgloss.NewStyle(). Foreground(lipgloss.Color(AccentColor)). Bold(true) SelectStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color(SelectColor)) // Component styles. TitleStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color(PrimaryColor)). Bold(true). MarginBottom(1) SubtitleStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color(SecondaryColor)). MarginBottom(1) SectionStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color(HeaderColor)). Bold(true). MarginTop(1). MarginBottom(1) BoxStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(lipgloss.Color(BorderColor)). Padding(1). MarginTop(1). MarginBottom(1) // Table styles. TableHeaderStyle = lipgloss.NewStyle(). Bold(true). Foreground(lipgloss.Color(HeaderColor)) TableRowStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color(TextColor)) // Status styles. RunningStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color(RunningColor)) StoppedStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color(StoppedColor)) PendingStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color(PendingColor)) )
Style definitions.
Functions ¶
func PrintError ¶
func PrintError(message string)
PrintError prints an error message with enhanced styling.
func PrintInfo ¶
func PrintInfo(label, value string)
PrintInfo prints an info message with label and value in a cleaner format.
func PrintMetadata ¶
func PrintMetadata(label, value string)
PrintMetadata prints metadata with styled label and value.
func PrintServiceLog ¶
func PrintServiceLog(serviceName, logLine string)
PrintServiceLog prints a log line with a styled service name prefix.
func PrintSuccess ¶
func PrintSuccess(message string)
PrintSuccess prints a success message with enhanced styling.
func PrintWarning ¶
func PrintWarning(message string)
PrintWarning prints a warning message with enhanced styling.
func RenderTable ¶
RenderTable renders the table with enhanced styling.
func StyleServiceName ¶
StyleServiceName styles a service name for log output.
func StyleStatusValue ¶
StyleStatusValue applies appropriate styling based on status value.
Types ¶
Click to show internal directories.
Click to hide internal directories.