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
e5171bf1
Commit
e5171bf1
authored
Jan 05, 2015
by
Matt Bell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands/http: client: Fixed decoding values in channel output
parent
937b9232
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
http/client.go
http/client.go
+3
-1
No files found.
http/client.go
View file @
e5171bf1
...
...
@@ -7,6 +7,7 @@ import (
"io"
"net/http"
"net/url"
"reflect"
"strings"
cmds
"github.com/jbenet/go-ipfs/commands"
...
...
@@ -149,7 +150,8 @@ func getResponse(httpRes *http.Response, req cmds.Request) (cmds.Response, error
outChan
:=
make
(
chan
interface
{})
go
func
()
{
dec
:=
json
.
NewDecoder
(
httpRes
.
Body
)
v
:=
req
.
Command
()
.
Type
outputType
:=
reflect
.
ValueOf
(
req
.
Command
()
.
Type
)
.
Type
()
v
:=
reflect
.
New
(
outputType
)
.
Interface
()
for
{
err
:=
dec
.
Decode
(
&
v
)
...
...
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