choose

package
v1.3.1-rc2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Choose

func Choose[Choice any](cmd *cobra.Command, prompt string, choices []Choice) (choice Choice, err error)

Choose offers the user a choice in their terminal of some available options, and returns the chosen option when they have made a valid selection. If there is only one available option, they won't be offered a choice and it will just be returned. It is an error to pass zero options.

Types

This section is empty.

Jump to

Keyboard shortcuts

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