Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show example of repeatable flag #43

Open
mcandre opened this issue Mar 14, 2017 · 1 comment
Open

Show example of repeatable flag #43

mcandre opened this issue Mar 14, 2017 · 1 comment

Comments

@mcandre
Copy link

mcandre commented Mar 14, 2017

Does docopt support repeating flags, like hello -e name:bob -e hair:nil? If so, could the README please add an example of the docopt string syntax for enabling this for one or more named flags?

@eirannejad
Copy link

eirannejad commented Mar 20, 2019

Any data type other than the built-in getters e.g. opts.Bool() can be accessed like a normal map object.

// needs type assertion to convert the type correctly
repeatedValues,_ := opts["--map"].([]string)

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

No branches or pull requests

2 participants