mirror of
https://github.com/logos-messaging/logos-messaging-go-bindings.git
synced 2026-01-03 22:43:11 +00:00
adding comment
This commit is contained in:
parent
1bae379f5d
commit
d705661ad3
@ -17,6 +17,25 @@ type PeerInfo struct {
|
||||
}
|
||||
|
||||
func ParsePeerInfoFromJSON(jsonStr string) (PeersData, error) {
|
||||
/*
|
||||
We expect a JSON string with the format:
|
||||
|
||||
{
|
||||
<peerId1>: {
|
||||
"protocols": [
|
||||
"protocol1",
|
||||
"protocol2",
|
||||
...
|
||||
],
|
||||
"addresses": [
|
||||
"address1",
|
||||
"address2",
|
||||
...
|
||||
]
|
||||
},
|
||||
<peerId2>: ...
|
||||
}
|
||||
*/
|
||||
// Create a temporary map to unmarshal the JSON data
|
||||
var rawMap map[string]struct {
|
||||
Protocols []string `json:"protocols"`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user