func (hps HostPorts) PrioritizedForScope(getMatcher ScopeMatchFunc) []string {
	indexes := indexesByScopeMatch(len(hps), func(i int) Address { return hps[i].(Address) }, getMatcher)
	out := make([]string, len(indexes))
	for i, index := range indexes {
		out[i] = DialAddress(hps[index])
	}
	return out
}
// PrioritizedForScope orders the HostPorts by best match for the input scope
// matching function and returns them in NetAddr form.
// If there are no suitable addresses then an empty slice is returned.
PrioritizedForScope orders the HostPorts by best match for the input scope
matching function and returns them in NetAddr form.
If there are no suitable addresses then an empty slice is returned.
// PrioritizedForScope orders the HostPorts by best match for the input scope // matching function and returns them in NetAddr form . // If there are no suitable addresses then an empty slice is returned .
func (hps HostPorts) PrioritizedForScope(getMatcher ScopeMatchFunc) []string {
	indexes := indexesByScopeMatch(len(hps), func(i int) Address { return hps[i].(Address) }, getMatcher)
	out := make([]string, len(indexes))
	for i, index := range indexes {
		out[i] = DialAddress(hps[index])
	}
	return out
}
func ( hps HostPorts ) PrioritizedForScope ( getMatcher ScopeMatchFunc ) [ ] string { indexes := indexesByScopeMatch ( len ( hps ) , func ( i int ) Address { return hps [ i ] . ( Address ) } , getMatcher ) out := make ( [ ] string , len ( indexes ) ) for i , index := range indexes { out [ i ] = DialAddress ( hps [ index ] ) } return out }
PrioritizedForScope orders the HostPorts by best match for the input scope
matching function and returns them in NetAddr form.
PrioritizedForScope orders the HostPorts by best match for the input scope matching function and returns them in NetAddr form .