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