commands/cli: Better comment for parsePath
Matt Bell committed
Nov 3, 2014 at 22:35 UTC
068e10cc5d3cfbe3d5305730a2a8608d5cf23b5d
1 file changed
+2
-1
commands/cli/parse.go
+2
-1
@@ -55,7 +55,8 @@ func Parse(input []string, roots ...*cmds.Command) (cmds.Request, *cmds.Command,
55
return req, root, nil
56
}
57
58
-// parsePath gets the command path from the command line input
58
+// parsePath separates the command path and the opts and args from a command string
59
+// returns command path slice, rest slice, and the corresponding *cmd.Command
60
func parsePath(input []string, root *cmds.Command) ([]string, []string, *cmds.Command) {
61
cmd := root
62
i := 0