Do not change root flags for all commands

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
Guillaume Tardif 2020-12-14 17:40:51 +01:00
parent 7bed2343e6
commit 53ee1418af
1 changed files with 1 additions and 2 deletions

View File

@ -150,8 +150,7 @@ func main() {
opts.AddContextFlags(root.PersistentFlags())
opts.AddConfigFlags(root.PersistentFlags())
root.Flags().BoolVarP(&opts.Version, "version", "v", false, "Print version information and quit")
root.PersistentFlags().SetInterspersed(false)
root.Flags().SetInterspersed(false)
walk(root, func(c *cobra.Command) {
c.Flags().BoolP("help", "h", false, "Help for "+c.Name())
})