Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
71ff571e
Commit
71ff571e
authored
Oct 20, 2014
by
Matt Bell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands/cli: Made Parse return component fields instead of a Request
parent
b022ba4a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
commands/cli/parse.go
commands/cli/parse.go
+3
-3
No files found.
commands/cli/parse.go
View file @
71ff571e
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment