util

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidValue = errors.New("invalid value")
)

Functions

func AddGroupedCommands added in v0.9.1

func AddGroupedCommands(mainCommand *cobra.Command, group cobra.Group, cmds []*cobra.Command)

func All added in v0.4.0

func All(funcs ...survey.Validator) survey.Validator

func Ask

func Ask(question string, validate survey.Validator) (string, error)

func AskInt32 added in v0.9.0

func AskInt32(question string, validate survey.Validator) (int32, error)

func AskPath added in v0.5.1

func AskPath(question string, value string, validate survey.Validator) (string, error)

func AskSecretWithHelp added in v0.5.1

func AskSecretWithHelp(question string, help string, validate survey.Validator) (string, error)

func AssertBetween added in v0.9.0

func AssertBetween(min int32, max int32) survey.Validator

func AssertMinimumLength

func AssertMinimumLength(length int) survey.Validator

func Choose

func Choose(question string, items []string) (int, string, error)

func Confirm

func Confirm(question string) (bool, error)

func GetAvailableEphemeralPort added in v0.2.0

func GetAvailableEphemeralPort(iface string) (int, error)

func GetWorkspaceDir added in v0.2.0

func GetWorkspaceDir() (string, error)

func Lowercase added in v0.4.0

func Lowercase() survey.Validator

func MakeSpinner added in v0.2.0

func MakeSpinner(suffix string) *spinner.Spinner

Types

This section is empty.

Jump to

Keyboard shortcuts

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