SecretMatcher returns a SecretMatcher based on the UserPattern, for use with (*Analyzer).AddSecretMatcher()
()
| 80 | // SecretMatcher returns a SecretMatcher based on the UserPattern, |
| 81 | // for use with (*Analyzer).AddSecretMatcher() |
| 82 | func (u *UserPattern) SecretMatcher() SecretMatcher { |
| 83 | if len(u.Object) > 0 { |
| 84 | return u.objectMatcher() |
| 85 | } |
| 86 | |
| 87 | if u.reKey != nil { |
| 88 | return u.pairMatcher() |
| 89 | } |
| 90 | |
| 91 | return u.stringMatcher() |
| 92 | } |
| 93 | |
| 94 | // objectMatcher returns a SecretMatcher for matching against objects |
| 95 | func (u *UserPattern) objectMatcher() SecretMatcher { |
no test coverage detected