update documentation
This commit is contained in:
parent
0cb7706e03
commit
e2ca025569
|
@ -46,7 +46,7 @@ type Client struct {
|
|||
// Do performs an asynchronous query. The msg *Msg is the question to ask, the
|
||||
// string addr is the address of the nameserver. The methods returns a channel
|
||||
// of *Exchange. If ch is nil, a new channel is allocated and returned. If ch
|
||||
// is non nil ch is used and returned.
|
||||
// is non nil, ch is used and returned.
|
||||
func (c *Client) Do(msg *Msg, addr string, ch chan *Exchange) <-chan *Exchange {
|
||||
switch ch {
|
||||
case nil:
|
||||
|
|
5
dns.go
5
dns.go
|
@ -59,10 +59,9 @@
|
|||
// server configured on 127.0.0.1 and port 53:
|
||||
//
|
||||
// c := new(Client)
|
||||
// in, err := c.Exchange(m1, "127.0.0.1:53")
|
||||
// in, rtt, err := c.Exchange(m1, "127.0.0.1:53")
|
||||
//
|
||||
// An asynchronous query is also possible, see client.Do or client.DoRtt, when
|
||||
// you are interested in the round trip time of the exchange.
|
||||
// An asynchronous query is also possible, see client.Do.
|
||||
//
|
||||
// From a birds eye view a dns message consists out of four sections.
|
||||
// The question section: in.Question, the answer section: in.Answer,
|
||||
|
|
Loading…
Reference in New Issue