SIGN IN SIGN UP
spf13 / cobra UNCLAIMED

A Commander for modern Go CLI interactions

0 0 142 Go

fix: don't remove flag value that matches subcommand name (#1781)

When the command searches args to find the arg matching a
particular subcommand name, it needs to ignore flag values,
as it is possible that the value for a flag might match
the name of the sub command.

This change improves argsMinusFirstX() to ignore flag values
when it searches for the X to exclude from the result.
B
Brian Pursley committed
6b0bd3076cfafd1c108264ed1e4aa0c0fe3f8537
Parent: cc7e235
Committed by GitHub <noreply@github.com> on 11/8/2022, 4:12:02 AM