func (pas ProviderAddresses) OneMatchingScope(getMatcher ScopeMatchFunc) (ProviderAddress, bool) {
	indexes := indexesForScope(len(pas), func(i int) Address { return pas[i] }, getMatcher)
	if len(indexes) == 0 {
		return ProviderAddress{}, false
	}
	addr := pas[indexes[0]]
	logger.Debugf("selected %q as address, using scope %q", addr.Value, addr.Scope)
	return addr, true
}
// OneMatchingScope returns the address that best satisfies the input scope
// matching function. The boolean return indicates if a match was found.
OneMatchingScope returns the address that best satisfies the input scope
matching function. The boolean return indicates if a match was found.
// OneMatchingScope returns the address that best satisfies the input scope // matching function . The boolean return indicates if a match was found .
func (pas ProviderAddresses) OneMatchingScope(getMatcher ScopeMatchFunc) (ProviderAddress, bool) {
	indexes := indexesForScope(len(pas), func(i int) Address { return pas[i] }, getMatcher)
	if len(indexes) == 0 {
		return ProviderAddress{}, false
	}
	addr := pas[indexes[0]]
	logger.Debugf("selected %q as address, using scope %q", addr.Value, addr.Scope)
	return addr, true
}
func ( pas ProviderAddresses ) OneMatchingScope ( getMatcher ScopeMatchFunc ) ( ProviderAddress , bool ) { indexes := indexesForScope ( len ( pas ) , func ( i int ) Address { return pas [ i ] } , getMatcher ) if len ( indexes ) == 0 { return ProviderAddress { } , false } addr := pas [ indexes [ 0 ] ] logger . Debugf ( " " , addr . Value , addr . Scope ) return addr , true }
OneMatchingScope returns the address that best satisfies the input scope
matching function.
OneMatchingScope returns the address that best satisfies the input scope matching function .