func indexesByScopeMatch(numAddr int, getAddrFunc addressByIndexFunc, matchFunc ScopeMatchFunc) []int {
	matches := filterAndCollateAddressIndexes(numAddr, getAddrFunc, matchFunc)

	var prioritized []int
	for _, matchType := range scopeMatchHierarchy() {
		indexes, ok := matches[matchType]
		if ok && len(indexes) > 0 {
			prioritized = append(prioritized, indexes...)
		}
	}
	return prioritized
}
// indexesByScopeMatch filters address indexes by matching scope,
// then returns them in descending order of best match.
indexesByScopeMatch filters address indexes by matching scope,
then returns them in descending order of best match.
// indexesByScopeMatch filters address indexes by matching scope // then returns them in descending order of best match .
func indexesByScopeMatch(numAddr int, getAddrFunc addressByIndexFunc, matchFunc ScopeMatchFunc) []int {
	matches := filterAndCollateAddressIndexes(numAddr, getAddrFunc, matchFunc)
	var prioritized []int
	for _, matchType := range scopeMatchHierarchy() {
		indexes, ok := matches[matchType]
		if ok && len(indexes) > 0 {
			prioritized = append(prioritized, indexes...)
		}
	}
	return prioritized
}
func indexesByScopeMatch ( numAddr int , getAddrFunc addressByIndexFunc , matchFunc ScopeMatchFunc ) [ ] int { matches := filterAndCollateAddressIndexes ( numAddr , getAddrFunc , matchFunc ) var prioritized [ ] int for _ , matchType := range scopeMatchHierarchy ( ) { indexes , ok := matches [ matchType ] if ok && len ( indexes ) > 0 { prioritized = append ( prioritized , indexes ... ) } } return prioritized }
indexesByScopeMatch filters address indexes by matching scope,
then returns them in descending order of best match.
indexesByScopeMatch filters address indexes by matching scope then returns them in descending order of best match .