Skip to content

Conversation

wtrocki
Copy link

@wtrocki wtrocki commented Nov 26, 2020

Resolving numerous issues like:

#81

Putting my code with low hopes of getting this merged, but if you find this useful +1
I can improve it/add to examples etc. It feels like boolean prompt should be supported out of the box.

@CLAassistant
Copy link

CLAassistant commented Nov 26, 2020

CLA assistant check
All committers have signed the CLA.

"github.com/manifoldco/promptui"
)

func ShowQuestion(message string) bool {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I extended this with
func ShowQuestion(message string, defaultValueFlag bool) bool
then use that flag to set Default to either y or n so I can have different question types.

@jaredcat
Copy link

Thanks for writing this. I also agree that it's kind of weird that this isn't a built-in feature.
Also for what it's worth, I was having some issues with this and race conditions on v0.8.0. I rolled back to v0.3.2 and this works prefectly

@wtrocki
Copy link
Author

wtrocki commented Apr 27, 2021

I will look into this today. Sorry for low quality contribution. I did not get much hope of merging

@wtrocki
Copy link
Author

wtrocki commented Apr 27, 2021

@jaredkotoff Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants