Documentation
¶
Overview ¶
Package prompt provides simple interactive prompts using bufio.Scanner.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Select ¶ added in v0.1.1
Select displays a numbered list and lets the user pick one item. Returns the selected item string, or "" if input is invalid.
func SelectMulti ¶
SelectMulti displays a numbered list and lets the user pick items. Accepts "all" or comma-separated indices (1-based). Returns selected items.
func SelectWithOther ¶ added in v0.2.1
SelectWithOther displays a numbered list with an optional "Other" entry. If allowOther is true, an extra option lets the user type a custom value. The user can enter a number, or type text directly:
- With allowOther: non-numeric text is accepted as a freeform value.
- Without allowOther: text is matched (case-insensitive) against the first word of each item (e.g. typing "local" matches "local - Docker Compose...").
Types ¶
This section is empty.