ui

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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

func NewPresenter(outW, errW io.Writer) *Presenter

NewPresenter creates a new Console instance with Pulumi-like color support.

func (*Presenter) Advice

func (p *Presenter) Advice(format string, a ...any)

func (*Presenter) Detail

func (p *Presenter) Detail(format string, a ...any)

func (*Presenter) Err

func (p *Presenter) Err() io.Writer

Err returns the configured error writer (typically os.Stderr).

func (*Presenter) Error

func (p *Presenter) Error(format string, a ...any)

func (*Presenter) Header

func (p *Presenter) Header(format string, a ...any)

func (*Presenter) Highlight

func (p *Presenter) Highlight(text string) string

func (*Presenter) Info

func (p *Presenter) Info(format string, a ...any)

func (*Presenter) InfoPrefixOnly

func (p *Presenter) InfoPrefixOnly()

func (*Presenter) Newline

func (p *Presenter) Newline()

func (*Presenter) Out

func (p *Presenter) Out() io.Writer

Out returns the configured output writer (typically os.Stdout).

func (*Presenter) PromptForConfirmation

func (p *Presenter) PromptForConfirmation(prompt string) (bool, error)

func (*Presenter) PromptForInput

func (p *Presenter) PromptForInput(prompt string) (string, error)

func (*Presenter) PromptForMultiSelect added in v0.2.1

func (p *Presenter) PromptForMultiSelect(title string, options []string) ([]string, error)

PromptForMultiSelect displays a multi-choice list to the user and returns the selected options.

func (*Presenter) PromptForSelect added in v0.2.1

func (p *Presenter) PromptForSelect(title string, options []string) (string, error)

PromptForSelect displays a single-choice list to the user and returns the selected option.

func (*Presenter) Separator

func (p *Presenter) Separator()

func (*Presenter) Step

func (p *Presenter) Step(format string, a ...any)

func (*Presenter) Success

func (p *Presenter) Success(format string, a ...any)

func (*Presenter) Summary

func (p *Presenter) Summary(format string, a ...any)

func (*Presenter) Warning

func (p *Presenter) Warning(format string, a ...any)

Jump to

Keyboard shortcuts

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