mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00: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
|
|
}
|