I think this was needed at one point in early go versions. I need to make
sure everything still works, but this will likely be merged. You might also
check out my net branch, in which you can use a net.Conn, but it also still
has this code.
On Oct 2, 2013 5:47 PM, "gavaletz" <notifications@github.com> wrote:

> In client.go:
>
> > @@ -166,7 +166,7 @@ func (w *reply) read(p []byte) (n int, err error) {
> >  	switch w.client.Net {
> >  	case "tcp", "tcp4", "tcp6":
> >  		setTimeouts(w)
> > -		n, err = w.conn.(*net.TCPConn).Read(p[0:2])
>
> Also, I couldn't figure out why these were used in the first place. The
> unchecked conversion can/did cause a panic, and since you accept a net.Conn
> in your exported function it seems like a bad idea to hide conversions
> within the code without checking them. Unless I am missing something. BTW,
> thanks for the package. It has saved me a ton of time.
> … <#1417a10c314a45dd_>
> On Wed, Oct 2, 2013 at 12:10 PM, Miek Gieben <notifications@github.com>wrote:
> In client.go: > @@ -166,7 +166,7 @@ func (w *reply) read(p []byte) (n int,
> err error) { > switch w.client.Net { > case "tcp", "tcp4", "tcp6": >
> setTimeouts(w) > - n, err = w.conn.(*net.TCPConn).Read(p[0:2]) Why are
> these changes needed? — Reply to this email directly or view it on GitHub<
> https://github.com/miekg/dns/pull/58/files#r6719631> .
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/miekg/dns/pull/58/files#r6720775>
> .
>