code: func (p *GoogleProvider) newFilteredRecords(endpoints []*endpoint.Endpoint) []*dns.ResourceRecordSet {
  	records := []*dns.ResourceRecordSet{}
  
  	for _, endpoint := range endpoints {
  		if p.domainFilter.Match(endpoint.DNSName) {
  			records = append(records, newRecord(endpoint))
  		}
  	}
  
  	return records
  }
docs: // newFilteredRecords returns a collection of RecordSets based on the given endpoints and domainFilter.