integrii / flaggy

Idiomatic Go input parsing with subcommands, positional values, and flags at any position. No required project or package layout and no external dependencies.
The Unlicense
856 stars 30 forks source link

Fix bug with bool flags on subcommands #58

Closed ethanmoffat closed 4 years ago

ethanmoffat commented 4 years ago

Fixes error for valid bool flags "expected a following arg for flag , but it did not exist"

The fix is to check flags on all nested subcommands when determining if a flag is a bool

This fixes issue #57

integrii commented 4 years ago

Whoa. I'll test this tonight and merge if it looks good - I am surprised something like this snuck through tests. Thank you!

integrii commented 4 years ago

Looks great! Nice work finding the right place and way to solve this problem in the codebase on your first try. Flaggy's code isn't always easy to follow, being a large recursive string parser. Thanks!