Documentation
¶
Overview ¶
Package ui provides terminal output: colors, logging, logos, and welcome screens.
Index ¶
- Variables
- func Cecho(msg, color string)
- func Debug(msg string)
- func Debugf(format string, a ...any)
- func Error(msg string)
- func ErrorNoExit(msg string)
- func Errorf(format string, a ...any)
- func Info(msg string)
- func Infof(format string, a ...any)
- func Logo()
- func LogoSmall()
- func Success(msg string)
- func Successf(format string, a ...any)
- func Warn(msg string)
- func Warnf(format string, a ...any)
- type Spinner
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Red = "\033[0;31m" Green = "\033[0;32m" Yellow = "\033[0;33m" Blue = "\033[0;34m" Magenta = "\033[0;35m" Cyan = "\033[0;36m" White = "\033[0;37m" Bold = "\033[1m" Dim = "\033[2m" NC = "\033[0m" // No Color / Reset )
ANSI color codes.
View Source
var Verbose bool
Verbose controls whether debug messages are printed.
Functions ¶
func Debug ¶
func Debug(msg string)
Debug prints a debug message to stderr (only when Verbose is true).
func ErrorNoExit ¶
func ErrorNoExit(msg string)
ErrorNoExit prints an error message to stderr without exiting.
Types ¶
type Spinner ¶ added in v0.1.1
type Spinner struct {
// contains filtered or unexported fields
}
Spinner displays an animated spinner with a message and elapsed time.
func NewSpinner ¶ added in v0.1.1
NewSpinner creates a new spinner with the given message.
Click to show internal directories.
Click to hide internal directories.