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

templates: add support for switch args w/ parseArgs #893

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

jo3-l
Copy link
Contributor

@jo3-l jo3-l commented May 4, 2021

This PR adds support for switch args w/ parseArgs.

Changes

  • A new function, cswitch, is added to enable defining switch arguments. Open to bikeshedding about the name, it's quite terrible but I was unable to think of something better. At least it's consistent with carg?
  • parseArgs is slightly modified to support switch args during parsing.
  • A new method, Switch, is added to the ParsedArgs struct to enable retrieving parsed switch args.

@MatiasMFM2001
Copy link
Contributor

A new function, cswitch, is added to enable defining switch arguments. Open to bikeshedding about the name, it's quite terrible but I was unable to think of something better. At least it's consistent with carg?

I propose:

  1. switch
  2. modifier
  3. cflag -> I like it
  4. option
  5. copt

@jo3-l jo3-l force-pushed the feat/parseargs-switch-support branch from 249a54c to 0aeb34d Compare June 10, 2021 06:04
@jo3-l jo3-l force-pushed the feat/parseargs-switch-support branch from 0aeb34d to 630e272 Compare August 31, 2021 18:10
@ashishjh-bst ashishjh-bst merged commit a6b34de into botlabs-gg:dev Jan 10, 2023
ashishjh-bst added a commit to ashishjh-bst/yagpdb that referenced this pull request Jan 19, 2023
ashishjh-bst added a commit that referenced this pull request Jan 19, 2023
…1418)

This reverts commit a6b34de.

Co-authored-by: Ashish Jhanwar <ashishjh-bst@users.noreply.github.com>
@jo3-l jo3-l deleted the feat/parseargs-switch-support branch June 29, 2023 23:05
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

Successfully merging this pull request may close these issues.

3 participants