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

feature enhancement: typed arg? #13

Open
mw66 opened this issue Nov 27, 2021 · 1 comment
Open

feature enhancement: typed arg? #13

mw66 opened this issue Nov 27, 2021 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@mw66
Copy link

mw66 commented Nov 27, 2021

Hi,

Right now the arg's type is either string, or string[], and user need to convert manually to other types, e.g.

    int depth = args.arg("depth").to!int;

is it possible to allow user specify the arg type directly, e.g.

          .add(new IntArgument("depth", "dir depth"))

and access it directly later as:

    int depth = args.arg("depth");  // directly get int value

Thanks.

@mw66
Copy link
Author

mw66 commented Nov 27, 2021

BTW, I think we only need to support 3 basic types:

-- string // already there
-- bool
-- int

@robik robik added enhancement New feature or request help wanted Extra attention is needed labels Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants