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,
// use the root that matches the longest path (most accurately matches request)
maxLength := 0
for _, r := range roots {
p, i, c := parsePath(input, r)
o, s, err := parseOptions(i)
for _, root2 := range roots {
path2, input2, cmd2 := parsePath(input, root2)
opts2, stringArgs2, err := parseOptions(input2)
if err != nil {
return nil, root, c, p, err
return nil, root, cmd2, path2, err
}
length := len(p)
length := len(path2)
if length > maxLength {
maxLength = length
root = r
path = p
cmd = c
opts = o
stringArgs = s
root = root2
path = path2
cmd = cmd2
opts = opts2
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