ui

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IconSuccess     = "✔"
	IconError       = "✖"
	IconWarning     = "⚠"
	IconInfo        = "ℹ"
	IconProcessing  = "◐"
	IconLock        = "🔒"
	IconUnlock      = "🔓"
	IconBranch      = ">" // ASCII branch marker for feature branches
	IconEnvironment = "🏗"
	IconPromote     = "↑"
	IconDemote      = "↓"
	IconRelease     = "🚀"
	IconMerge       = "🔀"
	IconHook        = "🪝"
	IconGit         = "📦"
	IconStar        = "★"
	IconSparkles    = "**"
	IconGear        = "⚙"
	IconCheck       = "✔"
	IconCross       = "✖"
	IconArrowRight  = "→"
	IconArrowLeft   = "←"
	IconBullet      = "•"
	IconDiamond     = "◆"
	IconSquare      = "■"
	IconCircle      = "●"
)

ASCII icons and symbols

Variables

View Source
var (
	// Semantic status colors
	ColorSuccess = color.New(color.FgGreen, color.Bold)  // success
	ColorWarning = color.New(color.FgYellow, color.Bold) // warn
	ColorError   = color.New(color.FgRed, color.Bold)    // error
	ColorInfo    = color.New(color.FgCyan)               // info

	// Accents and muted
	ColorAccent = color.New(color.FgMagenta, color.Bold) // accent
	ColorMuted  = color.New(color.FgHiBlack)             // muted

	// Secondary semantics for specific entities
	ColorBranch      = color.New(color.FgBlue) // branch indicator color (standard ANSI blue)
	ColorEnvironment = color.New(color.FgCyan)
	ColorProd        = color.New(color.FgRed, color.Bold)
)

Semantic color palette for the CLI

Functions

func Bullet

func Bullet(msg string, icon string, color *color.Color)

Bullet prints a bullet point with custom icon and color

func BulletItem

func BulletItem(msg string)

BulletItem prints a simple bullet item

func CheckItem

func CheckItem(msg string)

CheckItem prints a checkmark item

func CrossItem

func CrossItem(msg string)

CrossItem prints a cross item

func Error

func Error(msg string)

Error prints an error message with icon and color

func Errorf

func Errorf(format string, args ...interface{})

Errorf prints a formatted error message

func Header(title string)

Header prints a simple accent-colored title (no box borders)

func Info

func Info(msg string)

Info prints an info message with icon and color

func Infof

func Infof(format string, args ...interface{})

Infof prints a formatted info message

func PrintBranch

func PrintBranch(branchName string)

PrintBranch prints branch information with icon

func PrintCommand

func PrintCommand(cmd string)

PrintCommand prints a command with highlighting

func PrintDemotion

func PrintDemotion(branch, env string)

PrintDemotion prints demotion information with icons

func PrintEmptyLine

func PrintEmptyLine()

PrintEmptyLine prints an empty line for spacing

func PrintEnvironment

func PrintEnvironment(envName string, envInfo interface{})

PrintEnvironment prints environment information with appropriate styling

func PrintLockStatus

func PrintLockStatus(locked bool, lockedBy string, lockedAt time.Time)

PrintLockStatus prints lock status with appropriate icon and color

func PrintPromotion

func PrintPromotion(branch, env string, isRelease bool)

PrintPromotion prints promotion information with icons

func PrintSeparator

func PrintSeparator()

PrintSeparator prints a visual separator

func PrintSpinner

func PrintSpinner(msg string)

PrintSpinner prints a simple spinner (for future async operations)

func PrintTimestamp

func PrintTimestamp(t time.Time)

PrintTimestamp prints a formatted timestamp

func Section

func Section(title string)

Section prints a section separator

func SubHeader

func SubHeader(title string)

SubHeader prints a stylized subheader

func Success

func Success(msg string)

Success prints a success message with icon and color

func Successf

func Successf(format string, args ...interface{})

Successf prints a formatted success message

func Warning

func Warning(msg string)

Warning prints a warning message with icon and color

func Warningf

func Warningf(format string, args ...interface{})

Warningf prints a formatted warning message

Types

type ProgressBar

type ProgressBar struct {
	// contains filtered or unexported fields
}

ProgressBar creates a simple progress bar (placeholder for future use)

func NewProgressBar

func NewProgressBar(total, width int) *ProgressBar

func (*ProgressBar) Update

func (p *ProgressBar) Update(current int)

Jump to

Keyboard shortcuts

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