MCPcopy
hub / github.com/BishopFox/jsluice / MatchValue

Method MatchValue

user-patterns.go:64–69  ·  view source on GitHub ↗

MatchValue returns true if a pattern's value regex matches the supplied value, or if there is no value regex.

(in string)

Source from the content-addressed store, hash-verified

62// MatchValue returns true if a pattern's value regex matches
63// the supplied value, or if there is no value regex.
64func (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

Callers 3

pairMatcherMethod · 0.95
stringMatcherMethod · 0.95
TestParseUserPatternsFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestParseUserPatternsFunction · 0.64