func (sas SpaceAddresses) InSpaces(spaces ...SpaceInfo) (SpaceAddresses, bool) {
	if len(spaces) == 0 {
		logger.Errorf("addresses not filtered - no spaces given.")
		return sas, false
	}

	spaceInfos := SpaceInfos(spaces)
	var selectedAddresses SpaceAddresses
	for _, addr := range sas {
		if space := spaceInfos.GetByID(addr.SpaceID); space != nil {
			logger.Debugf("selected %q as an address in space %q", addr.Value, space.Name)
			selectedAddresses = append(selectedAddresses, addr)
		}
	}

	if len(selectedAddresses) > 0 {
		return selectedAddresses, true
	}

	logger.Errorf("no addresses found in spaces %s", spaceInfos)
	return sas, false
}
// InSpaces returns the SpaceAddresses that are in the input spaces.
InSpaces returns the SpaceAddresses that are in the input spaces.
// InSpaces returns the SpaceAddresses that are in the input spaces .
func (sas SpaceAddresses) InSpaces(spaces ...SpaceInfo) (SpaceAddresses, bool) {
	if len(spaces) == 0 {
		logger.Errorf("addresses not filtered - no spaces given.")
		return sas, false
	}
	spaceInfos := SpaceInfos(spaces)
	var selectedAddresses SpaceAddresses
	for _, addr := range sas {
		if space := spaceInfos.GetByID(addr.SpaceID); space != nil {
			logger.Debugf("selected %q as an address in space %q", addr.Value, space.Name)
			selectedAddresses = append(selectedAddresses, addr)
		}
	}
	if len(selectedAddresses) > 0 {
		return selectedAddresses, true
	}
	logger.Errorf("no addresses found in spaces %s", spaceInfos)
	return sas, false
}
func ( sas SpaceAddresses ) InSpaces ( spaces ... SpaceInfo ) ( SpaceAddresses , bool ) { if len ( spaces ) == 0 { logger . Errorf ( " " ) return sas , false } spaceInfos := SpaceInfos ( spaces ) var selectedAddresses SpaceAddresses for _ , addr := range sas { if space := spaceInfos . GetByID ( addr . SpaceID ) ; space != nil { logger . Debugf ( " " , addr . Value , space . Name ) selectedAddresses = append ( selectedAddresses , addr ) } } if len ( selectedAddresses ) > 0 { return selectedAddresses , true } logger . Errorf ( " " , spaceInfos ) return sas , false }
InSpaces returns the SpaceAddresses that are in the input spaces.
InSpaces returns the SpaceAddresses that are in the input spaces .