mirror of
https://github.com/coredns/coredns.git
synced 2025-08-06 22:37:03 +02:00
chore: use raw string () with regexp.MustCompile to avoid having to escape twice (#6396)
This commit is contained in:
parent
997c7f9539
commit
8964fc2180
@ -31,7 +31,7 @@ func TestTruncatedCNAME(t *testing.T) {
|
|||||||
handler := Handler{
|
handler := Handler{
|
||||||
Zones: []string{"."},
|
Zones: []string{"."},
|
||||||
Templates: []template{{
|
Templates: []template{{
|
||||||
regex: []*regexp.Regexp{regexp.MustCompile("^cname\\.test\\.$")},
|
regex: []*regexp.Regexp{regexp.MustCompile(`^cname\.test\.$`)},
|
||||||
answer: []*gotmpl.Template{gotmpl.Must(gotmpl.New("answer").Parse(up.Answer[0].String()))},
|
answer: []*gotmpl.Template{gotmpl.Must(gotmpl.New("answer").Parse(up.Answer[0].String()))},
|
||||||
qclass: dns.ClassINET,
|
qclass: dns.ClassINET,
|
||||||
qtype: dns.TypeA,
|
qtype: dns.TypeA,
|
||||||
|
Loading…
Reference in New Issue
Block a user