cmd

package
v0.0.0-...-c012b7a Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskBool

func AskBool(question string, defaultAnswer string) bool

AskBool asks a question and expect a yes/no answer.

func AskChoice

func AskChoice(question string, choices []string, defaultAnswer string) string

AskChoice asks the user to select one of multiple options

func AskInt

func AskInt(question string, min int64, max int64, defaultAnswer string, validate func(int64) error) int64

AskInt asks the user to enter an integer between a min and max value

func AskPassword

func AskPassword(question string) string

AskPassword asks the user to enter a password.

func AskPasswordOnce

func AskPasswordOnce(question string) string

AskPasswordOnce asks the user to enter a password.

It's the same as AskPassword, but it won't ask to enter it again.

func AskString

func AskString(question string, defaultAnswer string, validate func(string) error) string

AskString asks the user to enter a string, which optionally conforms to a validation function.

func FormatSection

func FormatSection(header string, content string) string

FormatSection properly indents a text section

Types

This section is empty.

Jump to

Keyboard shortcuts

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