gitee.com/wgliang/goreporter@v0.0.0-20180902115603-df1b20f7c5d0/linters/simplecode/testdata/regexp-raw.go (about) 1 package pkg 2 3 import "regexp" 4 5 func fn2() string { return "" } 6 7 func fn() { 8 x := "abc" 9 const y = "abc" 10 regexp.MustCompile(`\\.`) 11 regexp.MustCompile("\\.") // MATCH /should use raw string.+\.MustCompile/ 12 regexp.Compile("\\.") // MATCH /should use raw string.+\.Compile/ 13 regexp.MustCompile("(?m:^lease (.+?) {\n((?s).+?)\\n}\n)") 14 regexp.MustCompile("\\*/[ \t\n\r\f\v]*;") 15 regexp.MustCompile(fn2()) 16 regexp.MustCompile(x) 17 regexp.MustCompile(y) 18 }