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-unixfs
Commits
83cda2e6
Commit
83cda2e6
authored
Nov 04, 2014
by
Matt Bell
Committed by
Juan Batiz-Benet
Nov 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands/http: Fixed arg parse bug
parent
fecb434a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
commands/http/parse.go
commands/http/parse.go
+2
-1
No files found.
commands/http/parse.go
View file @
83cda2e6
...
@@ -61,17 +61,18 @@ func Parse(r *http.Request, root *cmds.Command) (cmds.Request, error) {
...
@@ -61,17 +61,18 @@ func Parse(r *http.Request, root *cmds.Command) (cmds.Request, error) {
if
valCount
<=
lenRequired
&&
!
argDef
.
Required
{
if
valCount
<=
lenRequired
&&
!
argDef
.
Required
{
continue
continue
}
}
valCount
--
if
argDef
.
Type
==
cmds
.
ArgString
{
if
argDef
.
Type
==
cmds
.
ArgString
{
if
argDef
.
Variadic
{
if
argDef
.
Variadic
{
for
_
,
s
:=
range
stringArgs
{
for
_
,
s
:=
range
stringArgs
{
args
=
append
(
args
,
s
)
args
=
append
(
args
,
s
)
}
}
valCount
-=
len
(
stringArgs
)
}
else
if
len
(
stringArgs
)
>
0
{
}
else
if
len
(
stringArgs
)
>
0
{
args
=
append
(
args
,
stringArgs
[
0
])
args
=
append
(
args
,
stringArgs
[
0
])
stringArgs
=
stringArgs
[
1
:
]
stringArgs
=
stringArgs
[
1
:
]
valCount
--
}
else
{
}
else
{
break
break
...
...
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