Documentation ¶
Index ¶
- func AskOne(in survey.Prompt, out interface{}, opts ...survey.AskOpt) error
- func BeginTesting()
- func EndTesting()
- func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error)
- func NextFuncFromSlice(t *testing.T, inputs SurveyInputs, position *int) func() StringOrBool
- func WithNextSurveyInputFunc(next func() StringOrBool)
- type StringOrBool
- type SurveyInputs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskOne ¶
func AskOne(in survey.Prompt, out interface{}, opts ...survey.AskOpt) error
AskOne is a function which can be used to intercept surveys in the cli and replace the survey with input from a test input stream NextSurveyInput should be set to a function which returns the next string to satisfy the input
func NextFuncFromSlice ¶
func NextFuncFromSlice(t *testing.T, inputs SurveyInputs, position *int) func() StringOrBool
A helper which produces a next function that will call t.Fatal if all the inputs are exhausted position is an int representing the index in input for the next survey input
func WithNextSurveyInputFunc ¶
func WithNextSurveyInputFunc(next func() StringOrBool)
Configure this with a function that returns the next input required for a cli test
Types ¶
Click to show internal directories.
Click to hide internal directories.