choice

package
v0.2.22 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Text  string
	Value string
}

Item represent one of the multiple choices prompted to user

type Prompt

type Prompt struct {
	Message string
	Var     string
	Default string
	Items   []Item
}

Prompt represents a user prompt for a single choice among many

func (Prompt) Execute

func (p Prompt) Execute(context exec.Context) error

Execute prompts user for choice value

func (Prompt) String

func (p Prompt) String() string

Jump to

Keyboard shortcuts

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