commands/cli: Made Parse return component fields instead of a Request
Matt Bell committed
Oct 20, 2014 at 17:02 UTC
71ff571ecfa78568782837ecb4c5662ad5428b6f
1 file changed
+3
-3
commands/cli/parse.go
+3
-3
@@ -9,14 +9,14 @@ import (
9
10
// Parse parses the input commandline string (cmd, flags, and args).
11
// returns the corresponding command Request object.
12
-func Parse(input []string, root *commands.Command) (commands.Request, error) {
12
+func Parse(input []string, root *commands.Command) ([]string, map[string]interface{}, []string, error) {
13
path, input := parsePath(input, root)
14
opts, args, err := parseOptions(input)
15
if err != nil {
16
- return nil, err
16
+ return nil, nil, nil, err
17
}
18
19
- return commands.NewRequest(path, opts, args), nil
19
+ return path, opts, args, nil
20
}
21
22
// parsePath gets the command path from the command line input