prompt

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: May 13, 2025 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package prompt provides a prompter interface for UI interactions

Package prompt provides a prompter interface for prompting the user for input and a survey implementation of that interface. based on github.com/cli/cli/internal/prompter/prompter.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Prompter

type Prompter interface {
	Select(message string, defaultValue string, options []string) (int, error)
	MultiSelect(message string, defaultValues, options []string) ([]int, error)
	Input(prompt, defaultValue string) (string, error)
	InputWithHelp(prompt, help, defaultValue string) (string, error)
	Confirm(prompt string, defaultValue bool) (bool, error)
	ConfirmDeletion(requiredValue string) error
}

Prompter is the interface for prompting the user for input

func New

func New() Prompter

New creates a new prompter

Jump to

Keyboard shortcuts

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