AlecAivazis / survey

A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
MIT License
4.08k stars 351 forks source link

Conditional prompt #252

Closed brpaz closed 4 years ago

brpaz commented 4 years ago

Hello. Its possible to define a conditional prompt, meaning that it will only appear based on the answer on some other prompt?

Thank you

MarkusFreitag commented 4 years ago

You can achieve this behaviour by using two AskOnes after each other. Do the first one, valid its response and then decide whether to also do the second one.

AlecAivazis commented 4 years ago

I'm going to close this since its gone stale. Thanks for helping out as always @MarkusFreitag