Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrCancelled = errors.New("cancelled")
ErrCancelled is returned when the user cancels input (Ctrl+C or Esc).
var ErrNoTTY = errors.New("no interactive terminal available")
ErrNoTTY is returned when a TUI prompt is called without an interactive terminal.
Functions ¶
func Confirm ¶
Confirm presents a y/n prompt and returns the boolean result. Returns ErrCancelled if the user presses Ctrl+C or Esc. Returns ErrNoTTY if stdin is not a terminal.
func PromptHidden ¶
PromptHidden prompts the user for hidden input (e.g. API keys). Returns ErrCancelled if the user presses Ctrl+C or Esc. Returns ErrNoTTY if stdin is not a terminal.
func PromptText ¶
PromptText prompts for text input with an optional default value shown as placeholder. If the user enters nothing and presses Enter, the default value is returned. Returns ErrCancelled if the user presses Ctrl+C or Esc.
Types ¶
This section is empty.