8 "github.com/anacrolix/torrent/bencode"
14 _ bencode.Unmarshaler = new(Node)
17 func (n *Node) UnmarshalBencode(b []byte) (err error) {
19 err = bencode.Unmarshal(b, &iface)
23 switch v := iface.(type) {
34 *n = Node(net.JoinHostPort(v[0].(string), strconv.FormatInt(v[1].(int64), 10)))
37 err = fmt.Errorf("unsupported type: %T", iface)