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

Remove config via global variable #201

Closed AlecAivazis closed 5 years ago

AlecAivazis commented 5 years ago

Branching off of the conversation in #192, we should see if we can use variadic configuration functions to remove as much configuration via global variables as possible.

The things we should consider removing from global config:

ahmetb commented 5 years ago

+PageSize

AlecAivazis commented 5 years ago

@ahmetb thanks for the suggestion! I'm curious if that was because you think there is a better default? I pulled 7 out of nowhere so if you have any reason for a particular number, i'd love to hear it

ahmetb commented 5 years ago

I don't need a better default. :) I just need to configure it per-question.

AlecAivazis commented 5 years ago

Well you can already configure it per prompt by setting the PageSize field on the Select and MultiSelect structs but I'm adding the ability to set it with an AskOpt now