MatchKey returns true if a pattern's key regex matches the supplied value, or if there is no key regex
(in string)
| 71 | // MatchKey returns true if a pattern's key regex matches |
| 72 | // the supplied value, or if there is no key regex |
| 73 | func (u *UserPattern) MatchKey(in string) bool { |
| 74 | if u.reKey == nil { |
| 75 | return true |
| 76 | } |
| 77 | return u.reKey.MatchString(in) |
| 78 | } |
| 79 | |
| 80 | // SecretMatcher returns a SecretMatcher based on the UserPattern, |
| 81 | // for use with (*Analyzer).AddSecretMatcher() |