Documentation
¶
Overview ¶
Package ui is heraut's terminal styling on top of forge/ui: the gold accent, the huh theme, the version banner and the step spinner.
Index ¶
- Constants
- func Accent() forgeui.Accent
- func Err(w io.Writer, msg string) string
- func Header(w io.Writer, title string)
- func HelpLong() string
- func HuhTheme() huh.ThemeFunc
- func Info(w io.Writer, msg string) string
- func IsTTY(w io.Writer) bool
- func SplitSubs(subs []string) (ok, warnings []string)
- func Success(w io.Writer, msg string) string
- func VersionTemplate() string
- func Warn(w io.Writer, msg string) string
- func WarnLines(w io.Writer, msg string)
- func Warning(sub string) string
- type StepFn
Constants ¶
const CatchPhrase = "Every release deserves a héraut."
CatchPhrase is the tagline displayed under the logo.
Variables ¶
This section is empty.
Functions ¶
func Accent ¶ added in v0.23.0
Accent is heraut's brand — Heraldic: gold title/program/flags, azure commands — over forge's shared palette (forge ADR-0010).
func HelpLong ¶
func HelpLong() string
HelpLong returns the ASCII art + tagline, gold-accented, for use as cobra root.Long.
func SplitSubs ¶ added in v1.0.1
SplitSubs separates a step's sub-result lines into successes and warnings, in order, removing the warning mark.
func Success ¶ added in v0.8.0
Success returns "✓ <msg>" styled green when w supports color, plain otherwise.
func VersionTemplate ¶
func VersionTemplate() string
VersionTemplate returns a cobra text/template string for --version output. cobra fills {{.Name}} and {{.Version}} at runtime.
func Warn ¶ added in v0.8.0
Warn returns "! <msg>" styled yellow when w supports color, plain otherwise.