Documentation
¶
Overview ¶
Package prompt provides interactive prompt functionality for CM.
Package prompt is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // User input errors. ErrInvalidInput = errors.New("invalid user input") ErrUserCancelled = errors.New("user cancelled operation") ErrInvalidConfirmationInput = errors.New("invalid input: please enter 'y' or 'n'") )
Error definitions for prompt package.
Functions ¶
This section is empty.
Types ¶
type MockPrompt ¶
type MockPrompt struct {
// contains filtered or unexported fields
}
MockPrompt is a mock of Prompt interface.
func NewMockPrompt ¶
func NewMockPrompt(ctrl *gomock.Controller) *MockPrompt
NewMockPrompt creates a new mock instance.
func (*MockPrompt) EXPECT ¶
func (m *MockPrompt) EXPECT() *MockPromptMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPrompt) PromptForBasePath ¶
func (m *MockPrompt) PromptForBasePath(defaultBasePath string) (string, error)
PromptForBasePath mocks base method.
func (*MockPrompt) PromptForConfirmation ¶
func (m *MockPrompt) PromptForConfirmation(message string, defaultYes bool) (bool, error)
PromptForConfirmation mocks base method.
type MockPromptMockRecorder ¶
type MockPromptMockRecorder struct {
// contains filtered or unexported fields
}
MockPromptMockRecorder is the mock recorder for MockPrompt.
func (*MockPromptMockRecorder) PromptForBasePath ¶
func (mr *MockPromptMockRecorder) PromptForBasePath(defaultBasePath any) *gomock.Call
PromptForBasePath indicates an expected call of PromptForBasePath.
func (*MockPromptMockRecorder) PromptForConfirmation ¶
func (mr *MockPromptMockRecorder) PromptForConfirmation(message, defaultYes any) *gomock.Call
PromptForConfirmation indicates an expected call of PromptForConfirmation.
type Prompt ¶
type Prompt interface { // PromptForBasePath prompts the user for the base path with examples. PromptForBasePath(defaultBasePath string) (string, error) // PromptForConfirmation prompts the user for confirmation with a default value. PromptForConfirmation(message string, defaultYes bool) (bool, error) }
Prompt interface provides user interaction functionality.
Click to show internal directories.
Click to hide internal directories.