chore: use raw string () with regexp.MustCompile to avoid having to escape twice (#6396)
This commit is contained in:
parent
997c7f9539
commit
8964fc2180
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ func TestTruncatedCNAME(t *testing.T) {
|
|||
handler := Handler{
|
||||
Zones: []string{"."},
|
||||
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()))},
|
||||
qclass: dns.ClassINET,
|
||||
qtype: dns.TypeA,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue