AlecAivazis / survey

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

Removed Validator from positional args of AskOne #213

Closed AlecAivazis closed 5 years ago

AlecAivazis commented 5 years ago

This PR is part of the work outlined in #201 and removes the Validator passed as the third argument to AskOne in favor of an AskOpt.

Since this is passed straight through to Ask, this does have the side effect of allowing multiple validators to be specified for a single field. However, I don't think we want to change the api of the prompts to allow for multiple Validators to be provided but I can probably be convinced otherwise.

I also removed the FancyIcon stuff since we're doing some spring cleaning