Links
Comment on page

TextInput

Basic Usage

result, _ := pterm.DefaultInteractiveTextInput.Show()
pterm.Info.Printfln("You answered: %s", result)

Options

Name
Type
Description
TextStyle
*Style
Style of the text prompt
DefaultText
string
Default prompt text
MultiLine
bool
Sets if the input should accept multiple lines of text

Using Options

Methods

Method
Description
Show(text)
Displays the interactive text input field

Full Specification

pkg.go.dev contains the full specification for this printer and more technical descriptions.
Last modified 1yr ago