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 of CLI option groups #172

Merged
merged 1 commit into from
Nov 3, 2022

Conversation

mandelsoft
Copy link
Contributor

What this PR does / why we need it:

The add commands have lots of options because of the possibility to specify resources directly via options.
By default options are shown ordered in the command help.

It would be useful to be able to show the options grouped by their meaning, options for specifying the access, options for specifying local input and options specifying the resource meta data.

This PR provides a pflag extension to use flag annotations to specify option groups together with some utility functions to provide appropriately formatted Usage output.

Additionally the OptionTypeSet feature is extended to add group information.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

@mandelsoft mandelsoft merged commit c43932b into open-component-model:main Nov 3, 2022
@mandelsoft mandelsoft deleted the flags branch November 3, 2022 08:35
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.

2 participants