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

implement CopyToGoFlagSet #330

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

pohly
Copy link

@pohly pohly commented Sep 15, 2021

This is useful for programs which want to define some flags with pflag (for
example, in external packages) but still need to use Go flag command line
parsing to preserve backward compatibility with previous releases.

Without this in pflag, such tools have to resort to copying via the public
API, which leads to less useful help messages (type of basic values
will be unknown).

Fixes: #329

@CLAassistant
Copy link

CLAassistant commented Sep 15, 2021

CLA assistant check
All committers have signed the CLA.

This is useful for programs which want to define some flags with pflag (for
example, in external packages) but still need to use Go flag command line
parsing to preserve backward compatibility with previous releases.

TODO: add tests
@pohly pohly changed the title WIP: implement CopyToGoFlagSet implement CopyToGoFlagSet Oct 4, 2021
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.

support traditional single-dash flags
2 participants