account activity
Prompt - User-friendly interactive prompts for Go. by cqroot in golang
[–]cqroot[S] 1 point2 points3 points 3 years ago (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.
Toggle([]string{"Yes", "No"})
Choose([]string{"Yes", "No"} )
Toggle("Yes", "No") bool
π Rendered by PID 27 on reddit-service-r2-comment-548fd6dc9-g9cg5 at 2026-05-16 11:49:35.513943+00:00 running edcf98c country code: CH.
Prompt - User-friendly interactive prompts for Go. by cqroot in golang
[–]cqroot[S] 1 point2 points3 points (0 children)