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

Add RemoveFlag() function #358

Open tiegz opened 2 years ago

tiegz commented 2 years ago

This adds the ability to remove a Flag from a FlagSet, e.g. flagSet.RemoveFlag("my-flag")

My end-goal is to allow cobra commands to opt-out of PersistentFlags() that they inherit. Please LMK if I'm on the wrong track here.

(plus a few formatting changes)

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

tiegz commented 1 year ago

ping

tiegz commented 1 year ago

ping