Use pflags word separators to make - and _ equiv.

This commit is contained in:
Tim Hockin
2015-04-23 20:50:35 -07:00
parent 22db9fb176
commit 6694eff020
6 changed files with 12 additions and 13 deletions

View File

@@ -70,6 +70,7 @@ func (hk *HyperKube) Flags() *pflag.FlagSet {
if hk.baseFlags == nil {
hk.baseFlags = pflag.NewFlagSet(hk.Name, pflag.ContinueOnError)
hk.baseFlags.SetOutput(ioutil.Discard)
hk.baseFlags.SetWordSeparators([]string{"-", "_"})
hk.baseFlags.BoolVarP(&hk.helpFlagVal, "help", "h", false, "help for "+hk.Name)
// These will add all of the "global" flags (defined with both the