Skip to content
Myr

changed help flag setup to use PersistenFlags so -h will be supported

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Joel Scoble · committed by spf13 · parent d8ec18e · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:command.go+1 added-1 removed
635 unmodified lines
636 if c.flagErrorBuf == nil {637 c.flagErrorBuf = new(bytes.Buffer)638 }639 c.flags.SetOutput(c.flagErrorBuf)640 c.flags.BoolVar(&c.helpFlagVal, "help", false, "help for "+c.Name())640 c.PersistentFlags().BoolVarP(&c.helpFlagVal, "help", "h", false, "help for "+c.Name())641 }642 return c.flags643}644
93 unmodified lines