AlecAivazis / survey

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

Allow hiding password length #482

Open szh opened 1 year ago

szh commented 1 year ago

Addresses comments to #386

This PR allows you to set the HideCharacter to a space which will be interpreted by the RuneReader to mean that the user input should not be echoed and that it shouldn't print a "mask" either.

AlecAivazis commented 1 year ago

This looks good - mind adding a test case to this file?

szh commented 1 year ago

This looks good - mind adding a test case to this file?

I don't see how to add a test case there since the prompt is the same. I think this would require some refactoring. Do you want me to attempt?

szh commented 1 year ago

@AlecAivazis can we get this moving?

AlecAivazis commented 1 year ago

Yea feel free to refactor the tests to verify this behavior

AlecAivazis commented 1 year ago

Whoops! Wrong button 😅