Closed rmfish closed 5 years ago
Hey @rmfish - thanks for submitting this.
I'm a bit uneasy with changing the interface for Prompt
since it would be an API breaking change for survey. Given that you can pull this off with AskOne
or other hacky approaches like printing from Transform
, i'm inclined to think that this doesn't add enough to the collection of default prompts and is better kept in userland.
For your usecase, it seems very likely that the message you want to show the user depends on the answers to the other prompts which means Text
either needs to take a function of the previous values to define its message, or it would need to be created in an AskOne
anyway so that Message
can refer to the struct holding the answers.
Hey @rmfish i appreciate you also adding support for a go module. Would yu mind opening that up in a second PR so I can merge that bit ASAP?
Hey @rmfish i appreciate you also adding support for a go module. Would yu mind opening that up in a second PR so I can merge that bit ASAP?
OK :)
Hey @rmfish - thanks for submitting this.
I'm a bit uneasy with changing the interface for
Prompt
since it would be an API breaking change for survey. Given that you can pull this off withAskOne
or other hacky approaches like printing fromTransform
, i'm inclined to think that this doesn't add enough to the collection of default prompts and is better kept in userland.For your usecase, it seems very likely that the message you want to show the user depends on the answers to the other prompts which means
Text
either needs to take a function of the previous values to define its message, or it would need to be created in anAskOne
anyway so thatMessage
can refer to the struct holding the answers.
Sorry, I was not realized that it's bad to change the api of Prompt
. There are indeed other better ways to resolve my problems. I close this PR, thx.
Add a text prompt prints message without any answer.
160