prompt

package
v0.0.0-...-f666d52 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(msg string) bool

func Confirmf

func Confirmf(msg string, args ...interface{}) bool

func Input

func Input(p ValuePrompter) (err error)

func Select

func Select(p ValuePrompter, opts []string) (err error)

Types

type CustomValuePrompt

type CustomValuePrompt func(ValuePrompter) error

func NewDeferredSelectPrompt

func NewDeferredSelectPrompt(fn func() []string) CustomValuePrompt

func NewSelectNumberPrompt

func NewSelectNumberPrompt(opts ...int) CustomValuePrompt

func NewSelectPrompt

func NewSelectPrompt(opts ...string) CustomValuePrompt

type ValuePrompter

type ValuePrompter interface {
	Message() string
	Default() string
	Type() cty.Type
	Value() cty.Value
	SetValue(cty.Value)
}

Jump to

Keyboard shortcuts

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