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
54812306
Commit
54812306
authored
Nov 11, 2014
by
Matt Bell
Committed by
Juan Batiz-Benet
Nov 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands/cli: Use better temp variable names in Parse
parent
f48ce10e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
commands/cli/parse.go
commands/cli/parse.go
+10
-10
No files found.
commands/cli/parse.go
View file @
54812306
...
@@ -20,21 +20,21 @@ func Parse(input []string, roots ...*cmds.Command) (cmds.Request, *cmds.Command,
...
@@ -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)
// use the root that matches the longest path (most accurately matches request)
maxLength
:=
0
maxLength
:=
0
for
_
,
r
:=
range
roots
{
for
_
,
r
oot2
:=
range
roots
{
p
,
i
,
c
:=
parsePath
(
input
,
r
)
p
ath2
,
input2
,
cmd2
:=
parsePath
(
input
,
r
oot2
)
o
,
s
,
err
:=
parseOptions
(
i
)
o
pts2
,
stringArgs2
,
err
:=
parseOptions
(
i
nput2
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
root
,
c
,
p
,
err
return
nil
,
root
,
c
md2
,
path2
,
err
}
}
length
:=
len
(
p
)
length
:=
len
(
p
ath2
)
if
length
>
maxLength
{
if
length
>
maxLength
{
maxLength
=
length
maxLength
=
length
root
=
r
root
=
r
oot2
path
=
p
path
=
p
ath2
cmd
=
c
cmd
=
c
md2
opts
=
o
opts
=
o
pts2
stringArgs
=
s
stringArgs
=
s
tringArgs2
}
}
}
}
...
...
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