decorative

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: 2 Imported by: 0

Documentation

Overview

Package decorative implement decorative prompts using the survey library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decorative

type Decorative struct{}

Decorative is a decorative prompt.

func (Decorative) Confirm

func (d Decorative) 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 anything.

func (Decorative) Input

func (d Decorative) Input(msg string, defvalue string, required bool) string

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

func (Decorative) Password

func (d Decorative) Password(msg string) string

Password asks the user for a password. Password can't be empty.

func (Decorative) PressEnter

func (d Decorative) PressEnter(msg string)

PressEnter asks the user to press enter to continue.

func (Decorative) Select

func (d Decorative) Select(msg string, options []string, defvalue 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