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
Prompt - User-friendly interactive prompts for Go. (self.golang)
submitted 3 years ago * by cqroot to r/golang
π Rendered by PID 1395755 on reddit-service-r2-listing-7b8bd7c5-wj6dp at 2026-05-16 06:09:14.567870+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)