prompt

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package prompt provides interactive text and secret prompts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Prompter

type Prompter struct {
	// contains filtered or unexported fields
}

func New

func New(in io.Reader, out io.Writer) *Prompter

func (*Prompter) Ask

func (p *Prompter) Ask(label string) (string, error)

func (*Prompter) AskDefault

func (p *Prompter) AskDefault(label, value string) (string, error)

func (*Prompter) AskOptional

func (p *Prompter) AskOptional(label string) (string, error)

func (*Prompter) AskSecret

func (p *Prompter) AskSecret(label string) (string, error)

func (*Prompter) AskSecretWithConfirmation

func (p *Prompter) AskSecretWithConfirmation(label, confirmationLabel string) (string, error)

func (*Prompter) Confirm

func (p *Prompter) Confirm(label string, defaultYes bool) (bool, error)

Jump to

Keyboard shortcuts

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