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

Bool value for spf13 #3

Merged
merged 3 commits into from
Jan 22, 2015
Merged

Bool value for spf13 #3

merged 3 commits into from
Jan 22, 2015

Conversation

filbranden
Copy link

This is the counterpart to ogier#13 for the spf13/pflag repository, it fixes issue ogier#11 by implementing IsBoolFlag() same as Go's native pflag module.

This PR also includes #2 since I wanted to make sure the test cases would pass here. The commit SHA1 is the same, so merging one after the other should not cause any problems (and merging this one should make #2 obsolete) but if you wish I don't mind rebasing this one if you want to commit that one first...

cc'ing @jbeda with whom I discussed this issue, who also opened ogier#11.

Cheers,
Filipe

This was broken by commit 463bdc8 ("Adding Type() method to the values.") which added the method to the interface but did not update the custom types in unit tests.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
This is consistent with Go's native flag parsing module and can be used to implement custom boolean/tri-state flags.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
…rue/false/maybe)

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
@filbranden
Copy link
Author

@spf13 Ping?

@filbranden
Copy link
Author

Discussed this offline with Steve and he's happy with the patch, merging it now.

filbranden added a commit that referenced this pull request Jan 22, 2015
@filbranden filbranden merged commit f82776d into spf13:master Jan 22, 2015
@filbranden filbranden deleted the bool_value_for_spf13 branch January 23, 2015 00:11
infalmo pushed a commit to infalmo/pflag that referenced this pull request Sep 28, 2020
infalmo pushed a commit to infalmo/pflag that referenced this pull request Sep 28, 2020
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