ui

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const CatchPhrase = "Every release deserves a héraut."

CatchPhrase is the tagline displayed under the logo.

Variables

This section is empty.

Functions

func Err added in v0.8.0

func Err(w io.Writer, msg string) string

Err returns "✗ <msg>" styled red when w supports color, plain otherwise.

func Header(w io.Writer, title string)

Header writes a bold section title to w, surrounded by blank lines. Used to separate config / runtime / cliff sections in heraut check.

func HelpLong

func HelpLong() string

HelpLong returns the ASCII art + tagline for use as cobra root.Long.

func Info added in v0.8.0

func Info(w io.Writer, msg string) string

Info returns " <msg>" dimmed when w supports color, plain otherwise. Use for hints and supplementary context below a primary status line.

func Success added in v0.8.0

func Success(w io.Writer, msg string) string

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

func Warn(w io.Writer, msg string) string

Warn returns "! <msg>" styled yellow when w supports color, plain otherwise. Use for skipped checks and non-critical notices.

Types

type Step added in v0.9.0

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

Step represents a single named check or pipeline step. In TTY environments it shows an animated spinner while the work runs, then replaces it with a final status line. In non-TTY (CI, pipe, dry-run) it falls back to plain text so log files stay readable.

func StartPlainStep added in v0.9.0

func StartPlainStep(out io.Writer, msg string) *Step

StartPlainStep always uses plain lines regardless of terminal. Use in dry-run mode where output lines must not be overwritten by the spinner.

func StartStep added in v0.9.0

func StartStep(out io.Writer, msg string) *Step

StartStep begins a step with automatic TTY detection. Animates a spinner when the writer is a terminal, falls back to plain text otherwise.

func (*Step) Done added in v0.9.0

func (s *Step) Done(result string)

Done completes the step successfully. Prints "✓ step name — result" (or "✓ step name" when result is empty).

func (*Step) Fail added in v0.9.0

func (s *Step) Fail(detail string)

Fail completes the step with a failure. Prints "✗ step name — first_line" with any additional lines indented beneath.

func (*Step) Skip added in v0.9.0

func (s *Step) Skip(detail string)

Skip completes the step as an advisory warning (IsWarn=true). Prints "! step name — detail".

Jump to

Keyboard shortcuts

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