changed help flag setup to use PersistenFlags so -h will be supported
This commit is contained in:
		@ -637,7 +637,7 @@ func (c *Command) Flags() *flag.FlagSet {
 | 
				
			|||||||
			c.flagErrorBuf = new(bytes.Buffer)
 | 
								c.flagErrorBuf = new(bytes.Buffer)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		c.flags.SetOutput(c.flagErrorBuf)
 | 
							c.flags.SetOutput(c.flagErrorBuf)
 | 
				
			||||||
		c.flags.BoolVar(&c.helpFlagVal, "help", false, "help for "+c.Name())
 | 
							c.PersistentFlags().BoolVarP(&c.helpFlagVal, "help", "h", false, "help for "+c.Name())
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return c.flags
 | 
						return c.flags
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user