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

Support for numeric values #2

Closed
jbx1 opened this issue Feb 14, 2016 · 2 comments
Closed

Support for numeric values #2

jbx1 opened this issue Feb 14, 2016 · 2 comments

Comments

@jbx1
Copy link

jbx1 commented Feb 14, 2016

It is not clear if this API supports numeric (integers and floating points) values. One often needs to pass a specific numeric parameters. For example: --max-delay 3000 --max-error 3.24

It also needs to provide support for default values, for when they are omitted and a sensible default needs to be used in that case.

(If this functionality is actually supported the documentation doesn't show how to do this, so needs to be updated).

@backuitist
Copy link
Member

Yes this is supported in the form of the Read type class. See https://github.com/backuity/clist/blob/master/core/src/main/scala/org/backuity/clist/Read.scala#L26

There's a section about parsing in the documentation but you're right it's a little obscure if you're not familiar with type classes... I'll add an example.

@jbx1
Copy link
Author

jbx1 commented Feb 14, 2016

Much clearer now. Cheers! Will try it out.

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