prompt

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: GPL-3.0 Imports: 9 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(fmtStr string, args ...any) bool

Prompt for confirmation

func ConfirmRed added in v1.20.0

func ConfirmRed(fmtStr string, args ...any) bool

func ConfirmSecureSession

func ConfirmSecureSession(warning string) bool

Prompts the user to verify that there is nobody looking over their shoulder before printing sensitive information.

func ConfirmWithIAgree

func ConfirmWithIAgree(fmtStr string, args ...any) bool

Prompt for 'I agree' confirmation (used on important questions to avoid a quick 'y' response from the user)

func ConfirmYellow added in v1.20.0

func ConfirmYellow(fmtStr string, args ...any) bool

func Prompt

func Prompt(initialPrompt string, expectedFormat string, incorrectFormatPrompt string) string

Prompt for user input

func PromptPassword

func PromptPassword(initialPrompt string, expectedFormat string, incorrectFormatPrompt string) string

Prompt for password input

func Select

func Select(initialPrompt string, options []string) (int, string)

Prompt for user selection

Types

This section is empty.

Jump to

Keyboard shortcuts

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