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.


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>
> .
>