tiny fix for removeParentPersistentArgs

This commit is contained in:
Jun Nishimura 2023-07-22 22:57:41 +09:00
parent c67af4c687
commit 99d0be84df

View file

@ -1828,9 +1828,7 @@ func (c *Command) parseShortArgs(s string, args []string) (passedArgs []string,
return
}
func (c *Command) removeParentPersistentArgs(args []string) []string {
var newArgs []string
func (c *Command) removeParentPersistentArgs(args []string) (newArgs []string) {
for len(args) > 0 {
s := args[0]
args = args[1:]
@ -1850,8 +1848,7 @@ func (c *Command) removeParentPersistentArgs(args []string) []string {
}
args = restArgs
}
return newArgs
return
}
// ParseFlags parses persistent flag tree and local flags.