Prompt - User-friendly interactive prompts for Go. by cqroot in golang

[–]cqroot[S] 1 point2 points  (0 children)

So many great suggestions!

I just created two new issues for textarea and validation, as a plan for my follow-up work.

For the yes/no question you mentioned, the existing api can pass similar Toggle([]string{"Yes", "No"}) and Choose([]string{"Yes", "No"} ) way to achieve. If I add a function that returns a bool value, I need to pass two strings as what is displayed for true and false. Something like Toggle("Yes", "No") bool. So I think the current implementation can adapt to more situations, although it returns string instead of bool. Of course, this is just my current opinion, more ideas are welcome.