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 size-in-bytes type #23

Closed
carueda opened this issue Feb 1, 2017 · 0 comments
Closed

support size-in-bytes type #23

carueda opened this issue Feb 1, 2017 · 0 comments
Assignees

Comments

@carueda
Copy link
Owner

carueda commented Feb 1, 2017

Support a size type corresponding to the size-in-bytes formats supported by Typesafe-Config as specified in https://github.com/typesafehub/config/blob/master/HOCON.md#size-in-bytes-format

Example config spec for tscfg to process:

# required size
sizeReq: "size"

# optional size, no default
sizeOpt: "size?"

# optional size with default value 1024 bytes
sizeOptDef: "size | 1K"

# list of sizes
sizes: [ size ]

# list of lists of sizes
sizes2: [ [ size ] ]

Input config example:

sizeReq = "2048K"
sizeOpt = "1024000"
sizes = [ 1000, "64G", "16kB" ]
sizes2  = [[ 1000, "64G" ], [ "16kB" ] ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant