Documentation ¶
Index ¶
- type FakeInput
- func (f *FakeInput) Confirm(message string, defaultValue bool, help string) (bool, error)
- func (f *FakeInput) PickNameWithDefault(names []string, message string, defaultValue string, help string) (string, error)
- func (f *FakeInput) PickPassword(message string, help string) (string, error)
- func (f *FakeInput) PickValidValue(message string, defaultValue string, validator func(val interface{}) error, ...) (string, error)
- func (f *FakeInput) PickValue(message string, defaultValue string, required bool, help string) (string, error)
- func (f *FakeInput) SelectNames(names []string, message string, selectAll bool, help string) ([]string, error)
- func (f *FakeInput) SelectNamesWithFilter(names []string, message string, selectAll bool, filter string, help string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeInput ¶
type FakeInput struct { // Values the values to return indexed by the message Values map[string]string }
FakeInput provide a fake provider for testing
func (*FakeInput) PickNameWithDefault ¶
func (f *FakeInput) PickNameWithDefault(names []string, message string, defaultValue string, help string) (string, error)
PickNameWithDefault picks a value
func (*FakeInput) PickPassword ¶
PickPassword gets a password (via hidden input) from a user's free-form input
func (*FakeInput) PickValidValue ¶ added in v1.0.62
func (f *FakeInput) PickValidValue(message string, defaultValue string, validator func(val interface{}) error, help string) (string, error)
PickValidValue gets an answer to a prompt from a user's free-form input with a given validator
func (*FakeInput) PickValue ¶
func (f *FakeInput) PickValue(message string, defaultValue string, required bool, help string) (string, error)
PickValue picks a value
func (*FakeInput) SelectNames ¶
Click to show internal directories.
Click to hide internal directories.