prompt

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TermLock sync.Mutex

Functions

func CreateSurveyConfirm

func CreateSurveyConfirm(message string, options AskOpts) (bool, error)

func CreateSurveyInput

func CreateSurveyInput(message string, options AskOpts) (string, error)

func CreateSurveyMultiSelect

func CreateSurveyMultiSelect(message string, choices []string, options AskOpts) ([]string, error)

func CreateSurveySelect

func CreateSurveySelect(message string, choices []string, options AskOpts) (string, error)

func IsTTY

func IsTTY() bool

Helpers

func Lock

func Lock()

Lock and unlock helpers if needed elsewhere

func Unlock

func Unlock()

Types

type AskOpts

type AskOpts struct {
	Default   any // string for Input and Select, []string for MultiSelect
	Help      string
	PageSize  int              // MultiSelect and Select only
	Validator survey.Validator // survey.Required or ComposeValidators(...)
}

Jump to

Keyboard shortcuts

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