prompts

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CustomTemplate = &promptui.SelectTemplates{
	Label:    "{{ . }}",
	Active:   "▶ {{ . | cyan }}",
	Inactive: "  {{ . }}",
	Selected: "▶ {{ . | green }}",
}

Functions

func Input

func Input(label string) (string, error)

func InputWithValidation

func InputWithValidation(label string, v promptui.ValidateFunc) (string, error)

func Selection

func Selection(label string, items []string) (int, string, error)

Selection runs a selection prompt and returns the index and value of the selected item

func SelectionCustom

func SelectionCustom(label string, items []string) (int, string, error)

SelectionCustom runs a selection prompt with custom template and returns the index and value of the selected item

Types

This section is empty.

Jump to

Keyboard shortcuts

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