-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Option to allow passing value to bool flag #367
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5511c1d
to
6f6dc6b
Compare
When AllowBoolValues Option is given, allow passing a true/false value to a boolean. This is useful when a user is calling a program from a shell script and wishes to programatically set the flag by passing along an existing variable from bash. Signed-off-by: Alex Couture-Beil <alex@mofo.ca>
6f6dc6b
to
c253d68
Compare
any chance of a review @jessevdk ? |
please have a look on this @jessevdk |
jessevdk
approved these changes
Jun 15, 2024
nabeken
referenced
this pull request
in nabeken/psadm
Jun 17, 2024
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/jessevdk/go-flags](https://github.com/jessevdk/go-flags) | require | minor | `v1.5.0` -> `v1.6.1` | --- ### Release Notes <details> <summary>jessevdk/go-flags (github.com/jessevdk/go-flags)</summary> ### [`v1.6.1`](https://github.com/jessevdk/go-flags/releases/tag/v1.6.1) [Compare Source](https://github.com/jessevdk/go-flags/compare/v1.6.0...v1.6.1) **Full Changelog**: jessevdk/go-flags@v1.6.0...v1.6.1 ### [`v1.6.0`](https://github.com/jessevdk/go-flags/releases/tag/v1.6.0) [Compare Source](https://github.com/jessevdk/go-flags/compare/v1.5.0...v1.6.0) #### What's Changed - ini: fix IniParser.write() for zero values by [@​sean-](https://github.com/sean-) in [https://github.com/jessevdk/go-flags/pull/332](https://github.com/jessevdk/go-flags/pull/332) - fix a panic when generating help while the subcommand and all option groups are hidden by [@​bboozzoo](https://github.com/bboozzoo) in [https://github.com/jessevdk/go-flags/pull/354](https://github.com/jessevdk/go-flags/pull/354) - Help for positional args without allcmd.ArgsRequired dependent from arg.Required by [@​sv99](https://github.com/sv99) in [https://github.com/jessevdk/go-flags/pull/342](https://github.com/jessevdk/go-flags/pull/342) - Bump golang.org/x/sys from 0.0.0-20210320140829-1e4c9ba3b0c4 to 0.1.0 by [@​dependabot](https://github.com/dependabot) in [https://github.com/jessevdk/go-flags/pull/396](https://github.com/jessevdk/go-flags/pull/396) - Option to allow passing value to bool flag by [@​alexcb](https://github.com/alexcb) in [https://github.com/jessevdk/go-flags/pull/367](https://github.com/jessevdk/go-flags/pull/367) - Add support for SOURCE_DATE_EPOCH for TestMan by [@​anthonyfok](https://github.com/anthonyfok) in [https://github.com/jessevdk/go-flags/pull/376](https://github.com/jessevdk/go-flags/pull/376) - Update to run go-flags on AIX by [@​llrocha](https://github.com/llrocha) in [https://github.com/jessevdk/go-flags/pull/390](https://github.com/jessevdk/go-flags/pull/390) - Add option for key value delimiter by [@​anaprimawaty](https://github.com/anaprimawaty) in [https://github.com/jessevdk/go-flags/pull/392](https://github.com/jessevdk/go-flags/pull/392) - Undersocre support for numbers (set default base for strconv.Parse\* to 0) by [@​GRbit](https://github.com/GRbit) in [https://github.com/jessevdk/go-flags/pull/404](https://github.com/jessevdk/go-flags/pull/404) - docs: add ENV variable usage example by [@​cemremengu](https://github.com/cemremengu) in [https://github.com/jessevdk/go-flags/pull/371](https://github.com/jessevdk/go-flags/pull/371) - Support per-command PassAfterNonOption by [@​woky](https://github.com/woky) in [https://github.com/jessevdk/go-flags/pull/393](https://github.com/jessevdk/go-flags/pull/393) - Upgrade by [@​jessevdk](https://github.com/jessevdk) in [https://github.com/jessevdk/go-flags/pull/406](https://github.com/jessevdk/go-flags/pull/406) #### New Contributors - [@​sean-](https://github.com/sean-) made their first contribution in [https://github.com/jessevdk/go-flags/pull/332](https://github.com/jessevdk/go-flags/pull/332) - [@​sv99](https://github.com/sv99) made their first contribution in [https://github.com/jessevdk/go-flags/pull/342](https://github.com/jessevdk/go-flags/pull/342) - [@​dependabot](https://github.com/dependabot) made their first contribution in [https://github.com/jessevdk/go-flags/pull/396](https://github.com/jessevdk/go-flags/pull/396) - [@​alexcb](https://github.com/alexcb) made their first contribution in [https://github.com/jessevdk/go-flags/pull/367](https://github.com/jessevdk/go-flags/pull/367) - [@​anthonyfok](https://github.com/anthonyfok) made their first contribution in [https://github.com/jessevdk/go-flags/pull/376](https://github.com/jessevdk/go-flags/pull/376) - [@​llrocha](https://github.com/llrocha) made their first contribution in [https://github.com/jessevdk/go-flags/pull/390](https://github.com/jessevdk/go-flags/pull/390) - [@​anaprimawaty](https://github.com/anaprimawaty) made their first contribution in [https://github.com/jessevdk/go-flags/pull/392](https://github.com/jessevdk/go-flags/pull/392) - [@​GRbit](https://github.com/GRbit) made their first contribution in [https://github.com/jessevdk/go-flags/pull/404](https://github.com/jessevdk/go-flags/pull/404) - [@​cemremengu](https://github.com/cemremengu) made their first contribution in [https://github.com/jessevdk/go-flags/pull/371](https://github.com/jessevdk/go-flags/pull/371) - [@​woky](https://github.com/woky) made their first contribution in [https://github.com/jessevdk/go-flags/pull/393](https://github.com/jessevdk/go-flags/pull/393) **Full Changelog**: jessevdk/go-flags@v1.5.0...v1.6.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MDIuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQwMi4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When AllowBoolValues Option is given, allow passing a true/false value to a boolean.
This is useful when a user is calling a program from a shell script and
wishes to programatically set the flag by passing along an existing
variable from bash.
This addresses #366
Signed-off-by: Alex Couture-Beil alex@mofo.ca