matching/matching.go
func Omnimatch(password string, userInputs []string, filters ...func(match.Matcher) bool) (matches []match.Match) {

	//Can I run into the issue where nil is not equal to nil?
	if dictionaryMatchers == nil || adjacencyGraphs == nil {
		loadFrequencyList()
	}

	if userInputs != nil {
		userInputMatcher := buildDictMatcher("user_inputs", buildRankedDict(userInputs))
		matches = userInputMatcher(password)
	}

	for _, matcher := range matchers {
		shouldBeFiltered := false
		for i := range filters {
			if filters[i](matcher) {
				shouldBeFiltered = true
				break
			}
		}
		if !shouldBeFiltered {
			matches = append(matches, matcher.MatchingFunc(password)...)
		}
	}
	sort.Sort(match.Matches(matches))
	return matches
}
func Omnimatch(password string, userInputs []string, filters ...func(match.Matcher) bool) (matches []match.Match) {

	//Can I run into the issue where nil is not equal to nil?
	if dictionaryMatchers == nil || adjacencyGraphs == nil {
		loadFrequencyList()
	}

	if userInputs != nil {
		userInputMatcher := buildDictMatcher("user_inputs", buildRankedDict(userInputs))
		matches = userInputMatcher(password)
	}

	for _, matcher := range matchers {
		shouldBeFiltered := false
		for i := range filters {
			if filters[i](matcher) {
				shouldBeFiltered = true
				break
			}
		}
		if !shouldBeFiltered {
			matches = append(matches, matcher.MatchingFunc(password)...)
		}
	}
	sort.Sort(match.Matches(matches))
	return matches
}
func Omnimatch ( password string , userInputs [ ] string , filters ... func ( match . Matcher ) bool ) ( matches [ ] match . Match ) { //Can I run into the issue where nil is not equal to nil? if dictionaryMatchers == nil || adjacencyGraphs == nil { loadFrequencyList ( ) } if userInputs != nil { userInputMatcher := buildDictMatcher ( " " , buildRankedDict ( userInputs ) ) matches = userInputMatcher ( password ) } for _ , matcher := range matchers { shouldBeFiltered := false for i := range filters { if filters [ i ] ( matcher ) { shouldBeFiltered = true break } } if ! shouldBeFiltered { matches = append ( matches , matcher . MatchingFunc ( password ) ... ) } } sort . Sort ( match . Matches ( matches ) ) return matches }
// Omnimatch runs all matchers against the password
Omnimatch runs all matchers against the password