input

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: Apache-2.0 Imports: 0 Imported by: 35

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {

	// PickValue pick a value
	PickValue(message string, defaultValue string, required bool, help string) (string, error)

	// PickValidValue gets an answer to a prompt from a user's free-form input with a given validator
	PickValidValue(message string, defaultValue string, validator func(val interface{}) error, help string) (string, error)

	// PickPassword pick a password
	PickPassword(message string, help string) (string, error)

	// PickNameWithDefault pick a name with a default value
	PickNameWithDefault(names []string, message string, defaultValue string, help string) (string, error)

	// SelectNamesWithFilter selects zero or more names with a filter string
	SelectNamesWithFilter(names []string, message string, selectAll bool, filter string, help string) ([]string, error)

	// SelectNames selects zero or more names from the list
	SelectNames(names []string, message string, selectAll bool, help string) ([]string, error)

	// Confirm confirms an action
	Confirm(message string, defaultValue bool, help string) (bool, error)
}

Interface interface for command line input

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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