Skip to content

Commit

Permalink
Simplify matching func
Browse files Browse the repository at this point in the history
  • Loading branch information
cycneuramus committed May 27, 2024
1 parent b3eee2d commit 5bc777e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
on:
schedule:
- cron: '0 0 1 * *'
push:
workflow_dispatch:

jobs:
build:
Expand Down
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,13 @@ func find(rootDir string, fileExts []string) []string {
}

func isMatch(value string, queries []string) bool {
match := 0
for _, q := range queries {
if strings.Contains(value, q) {
match++
return true
}
}

return match > 0
return false
}

func copyFile(src, dst string) {
Expand Down

0 comments on commit 5bc777e

Please sign in to comment.