Documentation
¶
Overview ¶
Package ui provides the presentation layer for the CLI, handling output formatting and user interaction.
Index ¶
- type Presenter
- func (p *Presenter) Advice(format string, a ...any)
- func (p *Presenter) Detail(format string, a ...any)
- func (p *Presenter) Err() io.Writer
- func (p *Presenter) Error(format string, a ...any)
- func (p *Presenter) Header(format string, a ...any)
- func (p *Presenter) Highlight(text string) string
- func (p *Presenter) Info(format string, a ...any)
- func (p *Presenter) InfoPrefixOnly()
- func (p *Presenter) Newline()
- func (p *Presenter) Out() io.Writer
- func (p *Presenter) PromptForConfirmation(prompt string) (bool, error)
- func (p *Presenter) PromptForInput(prompt string) (string, error)
- func (p *Presenter) PromptForMultiSelect(title string, options []string) ([]string, error)
- func (p *Presenter) PromptForSelect(title string, options []string) (string, error)
- func (p *Presenter) Separator()
- func (p *Presenter) Step(format string, a ...any)
- func (p *Presenter) Success(format string, a ...any)
- func (p *Presenter) Summary(format string, a ...any)
- func (p *Presenter) Warning(format string, a ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Presenter ¶
type Presenter struct {
// contains filtered or unexported fields
}
Presenter handles structured writing to standard output and standard error, and reading standardized user input, mimicking the Pulumi CLI style.
func NewPresenter ¶
NewPresenter creates a new Console instance with Pulumi-like color support.
func (*Presenter) InfoPrefixOnly ¶
func (p *Presenter) InfoPrefixOnly()
InfoPrefixOnly prints the info prefix.
func (*Presenter) PromptForConfirmation ¶
PromptForConfirmation prompts the user for confirmation.
func (*Presenter) PromptForInput ¶
PromptForInput prompts the user for input.
func (*Presenter) PromptForMultiSelect ¶ added in v0.2.1
PromptForMultiSelect displays a multi-choice list to the user and returns the selected options.
func (*Presenter) PromptForSelect ¶ added in v0.2.1
PromptForSelect displays a single-choice list to the user and returns the selected option.