provider/digital_ocean.go
func digitalOceanChangesByZone(zones []godo.Domain, changeSet []*DigitalOceanChange) map[string][]*DigitalOceanChange {
	changes := make(map[string][]*DigitalOceanChange)
	zoneNameIDMapper := zoneIDName{}
	for _, z := range zones {
		zoneNameIDMapper.Add(z.Name, z.Name)
		changes[z.Name] = []*DigitalOceanChange{}
	}

	for _, c := range changeSet {
		zone, _ := zoneNameIDMapper.FindZone(c.ResourceRecordSet.Name)
		if zone == "" {
			log.Debugf("Skipping record %s because no hosted zone matching record DNS Name was detected ", c.ResourceRecordSet.Name)
			continue
		}
		changes[zone] = append(changes[zone], c)
	}

	return changes
}
func digitalOceanChangesByZone(zones []godo.Domain, changeSet []*DigitalOceanChange) map[string][]*DigitalOceanChange {
	changes := make(map[string][]*DigitalOceanChange)
	zoneNameIDMapper := zoneIDName{}
	for _, z := range zones {
		zoneNameIDMapper.Add(z.Name, z.Name)
		changes[z.Name] = []*DigitalOceanChange{}
	}

	for _, c := range changeSet {
		zone, _ := zoneNameIDMapper.FindZone(c.ResourceRecordSet.Name)
		if zone == "" {
			log.Debugf("Skipping record %s because no hosted zone matching record DNS Name was detected ", c.ResourceRecordSet.Name)
			continue
		}
		changes[zone] = append(changes[zone], c)
	}

	return changes
}
func digitalOceanChangesByZone ( zones [ ] godo . Domain , changeSet [ ] * DigitalOceanChange ) map [ string ] [ ] * DigitalOceanChange { changes := make ( map [ string ] [ ] * DigitalOceanChange ) zoneNameIDMapper := zoneIDName { } for _ , z := range zones { zoneNameIDMapper . Add ( z . Name , z . Name ) changes [ z . Name ] = [ ] * DigitalOceanChange { } } for _ , c := range changeSet { zone , _ := zoneNameIDMapper . FindZone ( c . ResourceRecordSet . Name ) if zone == " " { log . Debugf ( " " , c . ResourceRecordSet . Name ) continue } changes [ zone ] = append ( changes [ zone ] , c ) } return changes }
// digitalOceanchangesByZone separates a multi-zone change into a single change per zone.
digitalOceanchangesByZone separates a multi - zone change into a single change per zone .