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-cmds
Commits
f13e1fed
Commit
f13e1fed
authored
Nov 04, 2014
by
Matt Bell
Committed by
Juan Batiz-Benet
Nov 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands/http: Cleaned up argument handling in Parse
parent
065a3021
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
http/parse.go
http/parse.go
+9
-1
No files found.
http/parse.go
View file @
f13e1fed
...
...
@@ -45,9 +45,17 @@ func Parse(r *http.Request, root *cmds.Command) (cmds.Request, error) {
for
_
,
arg
:=
range
cmd
.
Arguments
{
if
arg
.
Type
==
cmds
.
ArgString
{
for
j
:=
0
;
len
(
stringArgs
)
>
0
&&
arg
.
Variadic
||
j
==
0
;
j
++
{
if
arg
.
Variadic
{
for
_
,
s
:=
range
stringArgs
{
args
=
append
(
args
,
s
)
}
}
else
if
len
(
stringArgs
)
>
0
{
args
=
append
(
args
,
stringArgs
[
0
])
stringArgs
=
stringArgs
[
1
:
]
}
else
{
break
}
}
else
{
...
...
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