prompt

package
v0.0.0-...-0e3b330 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoBellStdout = &stdoutQuiet{}

Functions

func Confirm

func Confirm(label string) bool

Confirm prompts the user to confirm a question with a yes or no answer. It displays a select prompt with the given label and returns true if the user selects "yes", and false if the user selects "no".

func Select

func Select(label string, items []string) (int, string)

Select prompts the user to select an item from a list of items. It displays a select prompt with the given label and returns the index and value of the selected item.

func String

func String(label string, required bool) string

String prompts the user to enter a string value. If required is true, the user will be prompted again if they enter an empty string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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