doc: example shows a conditional with non-bool

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2015-12-22 12:04:16 -05:00
parent 75e6e86cc6
commit 774b109199
1 changed files with 1 additions and 1 deletions

2
doc.go
View File

@ -186,7 +186,7 @@ Basic use pattern validating and replying to a message that has TSIG set.
func handleRequest(w dns.ResponseWriter, r *dns.Msg) {
m := new(dns.Msg)
m.SetReply(r)
if r.IsTsig() {
if r.IsTsig() != nil {
if w.TsigStatus() == nil {
// *Msg r has an TSIG record and it was validated
m.SetTsig("axfr.", dns.HmacMD5, 300, time.Now().Unix())