code: func addEndpoint(ep *endpoint.Endpoint, recordSets map[string]*recordSet, delete bool) {
  	key := fmt.Sprintf("%s/%s", ep.DNSName, ep.RecordType)
  	rs := recordSets[key]
  	if rs == nil {
  		rs = &recordSet{
  			dnsName:    canonicalizeDomainName(ep.DNSName),
  			recordType: ep.RecordType,
  			names:      make(map[string]bool),
  		}
  	}
  	if rs.zoneID == "" {
  		rs.zoneID = ep.Labels[designateZoneID]
  	}
  	if rs.recordSetID == "" {
  		rs.recordSetID = ep.Labels[designateRecordSetID]
  	}
  	for _, rec := range strings.Split(ep.Labels[designateOriginalRecords], "\000") {
  		if _, ok := rs.names[rec]; !ok && rec != "" {
  			rs.names[rec] = true
  		}
  	}
  	targets := ep.Targets
  	if ep.RecordType == endpoint.RecordTypeCNAME {
  		targets = canonicalizeDomainNames(targets)
  	}
  	for _, t := range targets {
  		rs.names[t] = !delete
  	}
  	recordSets[key] = rs
  }
docs: // adds endpoint into recordset aggregation, loading original values from endpoint labels first