equalMultiStringMapMatcher matches a string exactly against a map of valid values or against a set of prefix matchers.
| 879 | // equalMultiStringMapMatcher matches a string exactly against a map of valid values |
| 880 | // or against a set of prefix matchers. |
| 881 | type equalMultiStringMapMatcher struct { |
| 882 | // values contains values to match a string against. If the matching is case insensitive, |
| 883 | // the values here must be lowercase. |
| 884 | values map[string]struct{} |
| 885 | // prefixes maps strings, all of length minPrefixLen, to sets of matchers to check the rest of the string. |
| 886 | // If the matching is case insensitive, prefixes are all lowercase. |
| 887 | prefixes map[string][]StringMatcher |
| 888 | // minPrefixLen can be zero, meaning there are no prefix matchers. |
| 889 | minPrefixLen int |
| 890 | caseSensitive bool |
| 891 | } |
| 892 | |
| 893 | func (m *equalMultiStringMapMatcher) add(s string) { |
| 894 | if !m.caseSensitive { |
nothing calls this directly
no outgoing calls
no test coverage detected