Skip to content

Commit

Permalink
fixed syntax error on multiline TXT record
Browse files Browse the repository at this point in the history
  • Loading branch information
dmotylev authored and zaccone committed Aug 17, 2017
1 parent ab0b441 commit e1f9473
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions resolver_miekg.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"sync"

"github.com/miekg/dns"
"strings"
)

// NewMiekgDNSResolver returns new instance of Resolver
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e1f9473

Please sign in to comment.