dialog

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(label string) (bool, error)

Confirm prompt

Returns bool value, if confirmed, and error value

func Match

func Match(args *MatchPromptArgs) (string, error)

Creates a prompt that is valid when the value is the same as the default

func Text

func Text(args *TextPromptArgs) (output string, err error)

Text prompt

Types

type MatchPromptArgs

type MatchPromptArgs struct {
	Label    string
	MatchVal string
}

type TextPromptArgs

type TextPromptArgs struct {
	Label string

	Default string

	AllowEdit bool

	Validate promptui.ValidateFunc

	Mask rune

	HideEntered bool

	Templates *promptui.PromptTemplates
}

Jump to

Keyboard shortcuts

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