diff options
author | 2023-11-11 06:16:47 +0800 | |
---|---|---|
committer | 2023-11-10 14:16:47 -0800 | |
commit | 8964fc2180124248e0e086e22cead744c35aa13c (patch) | |
tree | 6d069ec310cede314198b577b31e04e60acba2fe | |
parent | 997c7f953962d47c242273f0e41398fdfb5b0151 (diff) | |
download | coredns-8964fc2180124248e0e086e22cead744c35aa13c.tar.gz coredns-8964fc2180124248e0e086e22cead744c35aa13c.tar.zst coredns-8964fc2180124248e0e086e22cead744c35aa13c.zip |
chore: use raw string () with regexp.MustCompile to avoid having to escape twice (#6396)
-rw-r--r-- | plugin/template/cname_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/template/cname_test.go b/plugin/template/cname_test.go index 6ce6d7d2d..eef949e2d 100644 --- a/plugin/template/cname_test.go +++ b/plugin/template/cname_test.go @@ -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, |