Skip to content

Commit

Permalink
refactor: Use raw string to avoid escaping twice in regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
taylankasap committed Nov 3, 2024
1 parent 6a2b872 commit 3cd1a3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion snippet/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"regexp"
)

var tomlRegEx = regexp.MustCompile("^.+\\.(toml)$")
var tomlRegEx = regexp.MustCompile(`^.+\.(toml)$`)

func getFiles(path string) (fileList []string) {
err := filepath.Walk(path, func(path string, f os.FileInfo, err error) error {
Expand Down

0 comments on commit 3cd1a3d

Please sign in to comment.