Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
9c83bd09
Commit
9c83bd09
authored
Feb 13, 2015
by
Jeromy
Browse files
fix for #757
parent
d2544da5
Changes
1
Hide whitespace changes
Inline
Side-by-side
peer/peer.go
View file @
9c83bd09
...
...
@@ -154,9 +154,11 @@ func (pi *PeerInfo) UnmarshalJSON(b []byte) error {
return
err
}
pi
.
ID
=
pid
addrs
:=
data
[
"Addrs"
]
.
([]
interface
{})
for
_
,
a
:=
range
addrs
{
pi
.
Addrs
=
append
(
pi
.
Addrs
,
ma
.
StringCast
(
a
.
(
string
)))
addrs
,
ok
:=
data
[
"Addrs"
]
.
([]
interface
{})
if
ok
{
for
_
,
a
:=
range
addrs
{
pi
.
Addrs
=
append
(
pi
.
Addrs
,
ma
.
StringCast
(
a
.
(
string
)))
}
}
return
nil
}
...
...
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