mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-14 01:48:18 -05:00
25 lines
338 B
Go
25 lines
338 B
Go
package config
|
|
|
|
import (
|
|
"regexp"
|
|
)
|
|
|
|
func anyRegexMatch(f string, res []*regexp.Regexp) bool {
|
|
for _, re := range res {
|
|
if regexMatched(f, re) {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
|
|
func regexMatched(f string, re *regexp.Regexp) bool {
|
|
if re == nil {
|
|
return false
|
|
}
|
|
if re.FindString(f) != "" {
|
|
return true
|
|
}
|
|
return false
|
|
}
|