Closed eimlav closed 5 years ago
@AlecAivazis I was unable to get TestMultiInputPrompt
tests to work. Would you be able to provide some advice on how I could get these working?
Hey @eimlav - thanks for submitting this.
We've had a few discussions over the years about a prompt like this and ultimately we decided that this a prompt like this is too similar to Input
to add to the group. That's not to say its not a useful prompt. The prompts in survey are designed as building blocks for prompts like this one so we try to only add ones that are truly unique.
Sorry about this! I know it can be disappointing to put a bunch of work into something that won't get accepted.
@AlecAivazis Ah I understand. I'll just make it a part of the package I'm using it in then. At least this saves me from having to write those tests! Thanks for the quick response.
This commit adds a MultiInput prompt allowing a user to enter multiple distinct values for a question. These are then returned as a []string. For example:
Then the user is prompted for the first answer, then the second and so on.
Then once finished they enter an empty line and the question will exit, outputting the answers.