MatchValue returns true if a pattern's value regex matches the supplied value, or if there is no value regex.
(in string)
| 62 | // MatchValue returns true if a pattern's value regex matches |
| 63 | // the supplied value, or if there is no value regex. |
| 64 | func (u *UserPattern) MatchValue(in string) bool { |
| 65 | if u.reValue == nil { |
| 66 | return true |
| 67 | } |
| 68 | return u.reValue.MatchString(in) |
| 69 | } |
| 70 | |
| 71 | // MatchKey returns true if a pattern's key regex matches |
| 72 | // the supplied value, or if there is no key regex |
no outgoing calls