fake

package
v1.0.88 Latest Latest
Warning

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

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

Documentation

Index

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) Confirm

func (f *FakeInput) Confirm(message string, defaultValue bool, help string) (bool, error)

func (*FakeInput) PickNameWithDefault

func (f *FakeInput) PickNameWithDefault(names []string, message string, defaultValue string, help string) (string, error)

PickNameWithDefault picks a value

func (*FakeInput) PickPassword

func (f *FakeInput) PickPassword(message string, help string) (string, error)

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

func (f *FakeInput) SelectNames(names []string, message string, selectAll bool, help string) ([]string, error)

func (*FakeInput) SelectNamesWithFilter

func (f *FakeInput) SelectNamesWithFilter(names []string, message string, selectAll bool, filter string, help string) ([]string, error)

Jump to

Keyboard shortcuts

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