From 37ccca1193df6f843ec016a4eb9e77d72fe07ad2 Mon Sep 17 00:00:00 2001 From: Jeff Widman Date: Wed, 7 Apr 2021 11:53:38 -0700 Subject: [PATCH] Use raw string to avoid double-escape --- repository_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository_test.go b/repository_test.go index 0dd9f2de4..fc98fbcac 100644 --- a/repository_test.go +++ b/repository_test.go @@ -1720,7 +1720,7 @@ func (s *RepositorySuite) TestLogPathRegexpWithError(c *C) { } func (s *RepositorySuite) TestLogPathFilterRegexp(c *C) { - pathRE := regexp.MustCompile(".*\\.go") + pathRE := regexp.MustCompile(`.*\.go`) pathIter := func(path string) bool { return pathRE.MatchString(path) }