Re: [go-nuts] python bencoded list equivalent in golang

2016-06-16 Thread Matt Harden
We use the type interface{} for data that can contain any type. So you might use bencode([]interface{}{4456, "Rakesh", 27}). On Thu, Jun 16, 2016 at 9:31 AM wrote: > The server which I am contacting to is written in python and excepts > bencoded list. > > In my existing python client code I do s

[go-nuts] python bencoded list equivalent in golang

2016-06-16 Thread rakeshhs1
The server which I am contacting to is written in python and excepts bencoded list. In my existing python client code I do something like this: >>> import bencode >>> data = [4456, 'Rakesh', 27] >>> bdata = bencode.bencode(data) >>> bdata 'li4456e6:Rakeshi27ee' Server gets back the list by: >>>