Skip to content

Commit

Permalink
Merge pull request #415 from Juneezee/perf/regexp-matchstring
Browse files Browse the repository at this point in the history
Avoid allocations with `(*regexp.Regexp).MatchString`
  • Loading branch information
boyter committed Nov 5, 2023
2 parents a960adc + c1708af commit 32a7e80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion processor/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ DIRENTS:
}

for _, exclude := range dw.excludes {
if exclude.Match([]byte(name)) || exclude.Match([]byte(path)) {
if exclude.MatchString(name) || exclude.MatchString(path) {
if Verbose {
printWarn("skipping file/directory due to match exclude: " + name)
}
Expand Down

0 comments on commit 32a7e80

Please sign in to comment.