Documentation
¶
Index ¶
- Constants
- Variables
- type BasicPrompter
- type MockPrompter
- func (m *MockPrompter) PromptForApprove(msg string) (bool, error)
- func (m *MockPrompter) PromptForString(infoMsg, promptMsg string) (string, error)
- func (m *MockPrompter) SetApproveResponses(responses []bool, errors []error)
- func (m *MockPrompter) SetStringResponses(responses []string, errors []error)
- type Prompter
Constants ¶
View Source
const ApprovePrompt = "Proceed? y/n (and hit enter)"
Variables ¶
View Source
var ErrorScanningUserInput = errors.New("error scanning user input")
View Source
var ErrorWrongApproveInput = errors.New("user input wrong approve command")
Functions ¶
This section is empty.
Types ¶
type BasicPrompter ¶
type BasicPrompter struct {
}
func NewBasicPrompter ¶
func NewBasicPrompter() *BasicPrompter
func (*BasicPrompter) PromptForApprove ¶
func (p *BasicPrompter) PromptForApprove(msg string) (bool, error)
func (*BasicPrompter) PromptForString ¶
func (p *BasicPrompter) PromptForString(infoMsg, promptMsg string) (string, error)
type MockPrompter ¶
type MockPrompter struct {
// contains filtered or unexported fields
}
func NewMockPrompter ¶
func NewMockPrompter() *MockPrompter
func (*MockPrompter) PromptForApprove ¶
func (m *MockPrompter) PromptForApprove(msg string) (bool, error)
func (*MockPrompter) PromptForString ¶
func (m *MockPrompter) PromptForString(infoMsg, promptMsg string) (string, error)
func (*MockPrompter) SetApproveResponses ¶
func (m *MockPrompter) SetApproveResponses(responses []bool, errors []error)
func (*MockPrompter) SetStringResponses ¶
func (m *MockPrompter) SetStringResponses(responses []string, errors []error)
Click to show internal directories.
Click to hide internal directories.