Documentation ¶
Index ¶
- type Mock
- func (m *Mock) Close()
- func (m *Mock) Confirm(title, message string, defaultChoice *bool) (bool, error)
- func (m *Mock) Input(title, message string, defaultResponse *string, flags ...prompt.ValidatorFlag) (string, error)
- func (m *Mock) InputAndValidate(title, message string, defaultResponse *string, validator prompt.ValidatorFunc, ...) (response string, err error)
- func (m *Mock) InputSecret(title, message string, flags ...prompt.ValidatorFlag) (response string, err error)
- func (m *Mock) IsInteractive() bool
- func (m *Mock) OnMethod(methodName string) *tmock.Call
- func (m *Mock) Select(title, message string, choices []string, defaultChoice *string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶
Mock the struct to mock the Prompt struct
func (*Mock) Input ¶
func (m *Mock) Input(title, message string, defaultResponse *string, flags ...prompt.ValidatorFlag) (string, error)
Input prompts the user for input
func (*Mock) InputAndValidate ¶
func (m *Mock) InputAndValidate(title, message string, defaultResponse *string, validator prompt.ValidatorFunc, flags ...prompt.ValidatorFlag) (response string, err error)
InputAndValidate prompts the user for input witha customer validator and validation flags
func (*Mock) InputSecret ¶
func (m *Mock) InputSecret(title, message string, flags ...prompt.ValidatorFlag) (response string, err error)
InputSecret prompts the user for input and obfuscates the text in stdout. Will fail if empty.
func (*Mock) IsInteractive ¶
Click to show internal directories.
Click to hide internal directories.