plain

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package plain implements prompts using the standard library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plain

type Plain struct{}

Plain implements Prompt using the standard library.

func (Plain) Confirm

func (p Plain) Confirm(msg string, defvalue bool) bool

Confirm asks for user for a "Yes" or "No" response. The default value is used if the user presses enter without typing neither Y nor N.

func (Plain) Input

func (p Plain) Input(msg string, _ string, required bool) string

Input asks the user for a string. If required is true then the string cannot be empty.

func (Plain) Password

func (p Plain) Password(msg string) string

Password asks the user for a password. We just forward the call to Input with required set to true.

func (Plain) PressEnter

func (p Plain) PressEnter(msg string)

PressEnter asks the user to press enter to continue.

func (Plain) Select

func (p Plain) Select(msg string, options []string, _ string) string

Select asks the user to select one of the provided options.

Jump to

Keyboard shortcuts

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