Commit 54812306 authored by Matt Bell's avatar Matt Bell Committed by Juan Batiz-Benet

commands/cli: Use better temp variable names in Parse

parent f48ce10e
...@@ -20,21 +20,21 @@ func Parse(input []string, roots ...*cmds.Command) (cmds.Request, *cmds.Command, ...@@ -20,21 +20,21 @@ func Parse(input []string, roots ...*cmds.Command) (cmds.Request, *cmds.Command,
// use the root that matches the longest path (most accurately matches request) // use the root that matches the longest path (most accurately matches request)
maxLength := 0 maxLength := 0
for _, r := range roots { for _, root2 := range roots {
p, i, c := parsePath(input, r) path2, input2, cmd2 := parsePath(input, root2)
o, s, err := parseOptions(i) opts2, stringArgs2, err := parseOptions(input2)
if err != nil { if err != nil {
return nil, root, c, p, err return nil, root, cmd2, path2, err
} }
length := len(p) length := len(path2)
if length > maxLength { if length > maxLength {
maxLength = length maxLength = length
root = r root = root2
path = p path = path2
cmd = c cmd = cmd2
opts = o opts = opts2
stringArgs = s stringArgs = stringArgs2
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment