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

Permit variadic functions and flag.Value-typed parameters #3

Merged
merged 6 commits into from
Jul 3, 2023

Conversation

bobg
Copy link
Owner

@bobg bobg commented Jul 2, 2023

This PR adds support for subcommand-implementing functions whose parameter lists end in ...string as an alternative to []string.

It also adds support for flag.Value-typed parameters.

It also adds support for multiple leading hyphens in the Param.Name field; i.e., you can write "-verbose" or "--verbose" (or even "---verbose") and it will mean the same thing: a flag named verbose, which at runtime will match a command-line option named -verbose or --verbose (per the behavior of Go's standard flag package).

@bobg bobg changed the title Bobg/variadic Permit variadic functions Jul 2, 2023
@bobg bobg changed the title Permit variadic functions Permit variadic functions and flag.Value-typed parameters Jul 2, 2023
@bobg bobg marked this pull request as ready for review July 3, 2023 14:27
@bobg bobg merged commit d68c4a2 into master Jul 3, 2023
1 check passed
@bobg bobg deleted the bobg/variadic branch July 3, 2023 17:08
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.

1 participant