Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStubber ¶
func NewStubber() (*Stubber, *FakePrompt)
NewStubber creates a new *Stubber which can stub out calls to returned *FakePrompt's AskOne method.
Types ¶
type FakePrompt ¶
FakePrompt is a mock implementation of a Prompt.
func (*FakePrompt) AskOne ¶
func (f *FakePrompt) AskOne(p survey.Prompt, response interface{}, opts ...survey.AskOpt) error
AskOne implements Prompt.
type Prompt ¶
type Prompt interface {
AskOne(p survey.Prompt, response interface{}, opts ...survey.AskOpt) error
}
Prompt can be used to request user input.
type Stubber ¶
type Stubber struct {
// contains filtered or unexported fields
}
Stubber can stub prompts.
func (*Stubber) StubMany ¶
func (s *Stubber) StubMany(values ...interface{})
StubOne makes the next prompts return the provided values.
func (*Stubber) StubOne ¶
func (s *Stubber) StubOne(value interface{})
StubOne makes the next prompt return value.
func (*Stubber) StubOneDefault ¶
func (s *Stubber) StubOneDefault()
StubOneDefault makes the next prompt return its default value.
func (*Stubber) StubOneError ¶
StubOneError makes the next prompt return err.
Click to show internal directories.
Click to hide internal directories.