From e1f9473c055a65d2c15097a0234b8258b7ba7bc0 Mon Sep 17 00:00:00 2001 From: Dmitry Motylev Date: Mon, 14 Aug 2017 19:13:27 +0100 Subject: [PATCH] fixed syntax error on multiline TXT record --- resolver_miekg.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resolver_miekg.go b/resolver_miekg.go index f4d66f3..62a27fa 100644 --- a/resolver_miekg.go +++ b/resolver_miekg.go @@ -5,6 +5,7 @@ import ( "sync" "github.com/miekg/dns" + "strings" ) // NewMiekgDNSResolver returns new instance of Resolver @@ -66,7 +67,7 @@ func (r *MiekgDNSResolver) LookupTXT(name string) ([]string, error) { txts := make([]string, 0, len(res.Answer)) for _, a := range res.Answer { if r, ok := a.(*dns.TXT); ok { - txts = append(txts, r.Txt...) + txts = append(txts, strings.Join(r.Txt,"")) } } return txts, nil @@ -91,7 +92,7 @@ func (r *MiekgDNSResolver) LookupTXTStrict(name string) ([]string, error) { txts := make([]string, 0, len(res.Answer)) for _, a := range res.Answer { if r, ok := a.(*dns.TXT); ok { - txts = append(txts, r.Txt...) + txts = append(txts, strings.Join(r.Txt,"")) } } return txts, nil