Help us shape the future of Go! Take the 2026 Go Developer Survey

ui

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SuccessIcon is a green checkmark
	SuccessIcon = lipgloss.NewStyle().
				Foreground(lipgloss.Color("10")).
				Bold(true).
				Render("✓")

	// ErrorIcon is a red cross
	ErrorIcon = lipgloss.NewStyle().
				Foreground(lipgloss.Color("9")).
				Bold(true).
				Render("✗")

	// WarnIcon is a yellow warning symbol
	WarnIcon = lipgloss.NewStyle().
				Foreground(lipgloss.Color("11")).
				Bold(true).
				Render("!")

	// InfoIcon is a blue info symbol
	InfoIcon = lipgloss.NewStyle().
				Foreground(lipgloss.Color("12")).
				Bold(true).
				Render("i")
)

Icon constants for consistent CLI output

View Source
var (
	// HeaderStyle is used for section headers
	HeaderStyle = lipgloss.NewStyle().
				Bold(true)

	// SuccessStyle renders text in green
	SuccessStyle = lipgloss.NewStyle().
					Foreground(lipgloss.Color("10"))

	// ErrorStyle renders text in red and bold
	ErrorStyle = lipgloss.NewStyle().
				Foreground(lipgloss.Color("9")).
				Bold(true)

	// WarnStyle renders text in yellow
	WarnStyle = lipgloss.NewStyle().
				Foreground(lipgloss.Color("11"))

	// DimStyle renders text dimmed/faint for secondary info
	DimStyle = lipgloss.NewStyle().
				Foreground(lipgloss.Color("8"))

	// BoldStyle renders text in bold
	BoldStyle = lipgloss.NewStyle().
				Bold(true)

	// FilePathStyle renders file paths in cyan
	FilePathStyle = lipgloss.NewStyle().
					Foreground(lipgloss.Color("14"))

	// CommandStyle renders CLI commands in bold cyan
	CommandStyle = lipgloss.NewStyle().
					Foreground(lipgloss.Color("14")).
					Bold(true)
)

Reusable style objects for consistent formatting

Functions

func Error

func Error(msg string) string

Error renders an error message with cross icon. Example output: " ✗ Failed to parse schema"

func Grouped

func Grouped(header string, items []string) string

Grouped renders a header followed by indented items (Cargo-style grouped output). Example:

Files:
  forge.toml
  main.go
func Header(msg string) string

Header renders a bold header. Example output: "Compiling resources..."

func Info

func Info(msg string) string

Info renders an info message with info icon. Example output: " i Using cached dependencies"

func Success

func Success(msg string) string

Success renders a success message with checkmark icon. Example output: " ✓ Project initialized"

func Warn

func Warn(msg string) string

Warn renders a warning message with warning icon. Example output: " ! Deprecated field type"

Types

This section is empty.

Jump to

Keyboard shortcuts

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