Commit 71ff571e authored by Matt Bell's avatar Matt Bell

commands/cli: Made Parse return component fields instead of a Request

parent b022ba4a
...@@ -9,14 +9,14 @@ import ( ...@@ -9,14 +9,14 @@ import (
// Parse parses the input commandline string (cmd, flags, and args). // Parse parses the input commandline string (cmd, flags, and args).
// returns the corresponding command Request object. // returns the corresponding command Request object.
func Parse(input []string, root *commands.Command) (commands.Request, error) { func Parse(input []string, root *commands.Command) ([]string, map[string]interface{}, []string, error) {
path, input := parsePath(input, root) path, input := parsePath(input, root)
opts, args, err := parseOptions(input) opts, args, err := parseOptions(input)
if err != nil { if err != nil {
return nil, err return nil, nil, nil, err
} }
return commands.NewRequest(path, opts, args), nil return path, opts, args, nil
} }
// parsePath gets the command path from the command line input // parsePath gets the command path from the command line input
......
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