interactive

package
v4.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package interactive implements all the functions to interactively interact with users

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskNumberInRange

func AskNumberInRange(start, end int, format string, a ...interface{}) (int, error)

AskNumberInRange prompts the user expecting an answer that is a number between start and end.

func AskQuestion

func AskQuestion(format string, a ...interface{}) (string, error)

AskQuestion prompts the user with a question and return the response

func AskQuestionNoEcho

func AskQuestionNoEcho(format string, a ...interface{}) (string, error)

AskQuestionNoEcho works like AskQuestion() except it doesn't echo user's input

func AskYNQuestion

func AskYNQuestion(defaultAnswer, format string, a ...interface{}) (string, error)

AskYNQuestion prompts the user expecting an answer that's either "y", "n" or a blank, in which case defaultAnswer is returned.

func GetPassphrase

func GetPassphrase(message string, retries int) (string, error)

GetPassphrase will ask the user for a password with int number of retries.

Types

This section is empty.

Jump to

Keyboard shortcuts

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