Documentation
¶
Overview ¶
Package ui centralizes all terminal output so the whole CLI speaks with one voice: plain language in the default view, technical detail behind verbose.
Index ¶
- type UI
- func (u *UI) Bold(s string) string
- func (u *UI) Confirm(question string, def bool) bool
- func (u *UI) Detail(format string, a ...any)
- func (u *UI) Fail(format string, a ...any)
- func (u *UI) Faint(s string) string
- func (u *UI) Green(s string) string
- func (u *UI) Info(format string, a ...any)
- func (u *UI) Printf(format string, a ...any)
- func (u *UI) Red(s string) string
- func (u *UI) Success(format string, a ...any)
- func (u *UI) Warn(format string, a ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UI ¶
type UI struct {
Out io.Writer
Err io.Writer
Verbose bool
// Interactive is false when stdin is not a TTY (CI, pipes); prompts then
// fall back to safe defaults instead of hanging.
Interactive bool
// AssumeYes (--yes) answers every confirmation with its default.
AssumeYes bool
}
Click to show internal directories.
Click to hide internal directories.