chore: reorgnalize function

This commit is contained in:
zzjc1234 2024-08-30 14:06:01 +08:00 committed by Boming Zhang
parent c0bd1c1fcf
commit 43b8f374db
GPG Key ID: D47306D7062CDA9D
2 changed files with 9 additions and 9 deletions

View File

@ -10,15 +10,6 @@ import (
"strings"
)
func inString(str1 string, strList []string) bool {
for _, str := range strList {
if str1 == str {
return true
}
}
return false
}
// getForbiddens retrieves a list of forbidden files in the specified root directory.
// It searches for files that do not match the specified regex patterns in the given file list.
func getForbiddens(root string, fileList []string, localList string) ([]string, error) {

View File

@ -5,6 +5,15 @@ import (
"regexp"
)
func inString(str1 string, strList []string) bool {
for _, str := range strList {
if str1 == str {
return true
}
}
return false
}
// addExt appends the specified extension to each file name in the given fileList.
// It modifies the original fileList in place.
func addExt(fileList []string, ext string) {