Documentation
¶
Index ¶
- Constants
- Variables
- func Bullet(msg string, icon string, color *color.Color)
- func BulletItem(msg string)
- func CheckItem(msg string)
- func CrossItem(msg string)
- func Error(msg string)
- func Errorf(format string, args ...interface{})
- func Header(title string)
- func Info(msg string)
- func Infof(format string, args ...interface{})
- func PrintBox(lines []string, title string)
- func PrintBranch(branchName string)
- func PrintCommand(cmd string)
- func PrintDemotion(branch, env string)
- func PrintEmptyLine()
- func PrintEnvironment(envName string, envInfo interface{})
- func PrintLockStatus(locked bool, lockedBy string, lockedAt time.Time)
- func PrintPromotion(branch, env string, isRelease bool)
- func PrintSeparator()
- func PrintSpinner(msg string)
- func PrintTimestamp(t time.Time)
- func Section(title string)
- func SubHeader(title string)
- func Success(msg string)
- func Successf(format string, args ...interface{})
- func Warning(msg string)
- func Warningf(format string, args ...interface{})
- type ProgressBar
Constants ¶
View Source
const ( IconSuccess = "✓" IconError = "❌" IconWarning = "⚠" IconInfo = "ℹ" IconProcessing = "⏳" IconLock = "🔒" IconUnlock = "🔓" IconBranch = "🌿" IconEnvironment = "🏗️" IconPromote = "⬆️" IconDemote = "⬇️" IconRelease = "🚀" IconMerge = "🔀" IconHook = "🪝" IconGit = "📦" IconStar = "⭐" IconSparkles = "✨" IconGear = "⚙️" IconCheck = "✔" IconCross = "✖" IconArrowRight = "→" IconArrowLeft = "←" IconBullet = "•" IconDiamond = "◆" IconSquare = "■" IconCircle = "●" )
ASCII icons and symbols
View Source
const ( BoxTopLeft = "╭" BoxTopRight = "╮" BoxBottomLeft = "╰" BoxBottomRight = "╯" BoxHorizontal = "─" BoxVertical = "│" BoxCross = "┼" )
Box drawing characters for borders
Variables ¶
View Source
var ( // Primary colors ColorPrimary = color.New(color.FgCyan, color.Bold) ColorSecondary = color.New(color.FgBlue) ColorAccent = color.New(color.FgMagenta) // Status colors ColorSuccess = color.New(color.FgGreen, color.Bold) ColorWarning = color.New(color.FgYellow, color.Bold) ColorError = color.New(color.FgRed, color.Bold) ColorInfo = color.New(color.FgWhite) // Environment colors ColorDev = color.New(color.FgCyan) ColorQA = color.New(color.FgYellow) ColorStaging = color.New(color.FgBlue) ColorProd = color.New(color.FgRed, color.Bold) // Muted colors ColorMuted = color.New(color.FgHiBlack) ColorDim = color.New(color.FgBlack) ColorHighlight = color.New(color.BgCyan, color.FgBlack, color.Bold) )
Color palette for the CLI
Functions ¶
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf prints a formatted error message
func PrintBranch ¶
func PrintBranch(branchName string)
PrintBranch prints branch information with icon
func PrintDemotion ¶
func PrintDemotion(branch, env string)
PrintDemotion prints demotion information with icons
func PrintEnvironment ¶
func PrintEnvironment(envName string, envInfo interface{})
PrintEnvironment prints environment information with appropriate styling
func PrintLockStatus ¶
PrintLockStatus prints lock status with appropriate icon and color
func PrintPromotion ¶
PrintPromotion prints promotion information with icons
func PrintSpinner ¶
func PrintSpinner(msg string)
PrintSpinner prints a simple spinner (for future async operations)
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)
Click to show internal directories.
Click to hide internal directories.