ask

package
v0.3.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PasswordQuestionTemplate = `` /* 473-byte string literal not displayed */

PasswordQuestionTemplate is a template with color formatting. See Documentation: https://github.com/mgutz/ansi#style-format

Functions

This section is empty.

Types

type Password

type Password struct {
	survey.Renderer

	Default        string
	DefaultDisplay string
	Message        string
	Help           string
}

Password is like a normal Input but the text shows up as *'s and there is no default. Response type is a string.

password := ""
prompt := &survey.Password{ Message: "Please type your password" }
survey.AskOne(prompt, &password)

func (*Password) Cleanup

func (p *Password) Cleanup(config *survey.PromptConfig, val any) error

Cleanup hides the string with a fixed number of characters.

func (*Password) Prompt

func (p *Password) Prompt(config *survey.PromptConfig) (any, error)

func (*Password) Required

func (p *Password) Required(val any) error

Required does not allow an empty value.

type PasswordTemplateData

type PasswordTemplateData struct {
	Password

	ShowHelp bool
	Config   *survey.PromptConfig
}

Jump to

Keyboard shortcuts

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