spf13 / pflag

Drop-in replacement for Go's flag package, implementing POSIX/GNU-style --flags.
BSD 3-Clause "New" or "Revised" License
2.43k stars 348 forks source link

TryAddFlag{,Set} #325

Closed robberphex closed 3 years ago

robberphex commented 3 years ago

This PR allows add func TryAddFlag{,Set}, which add flag{Set} and ignore conflicts.

implement https://github.com/spf13/cobra/issues/1486

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

robberphex commented 3 years ago

@spf13 Could you review this PR?

robberphex commented 3 years ago

Closed, please see https://github.com/spf13/pflag/pull/333