func endpointToRecord(ep *endpoint.Endpoint) *dynect.DataBlock {
	result := dynect.DataBlock{}

	if ep.RecordType == endpoint.RecordTypeA {
		result.Address = ep.Targets[0]
	} else if ep.RecordType == endpoint.RecordTypeCNAME {
		result.CName = ep.Targets[0]
	} else if ep.RecordType == endpoint.RecordTypeTXT {
		result.TxtData = ep.Targets[0]
	}

	return &result
}
func endpointToRecord(ep *endpoint.Endpoint) *dynect.DataBlock {
	result := dynect.DataBlock{}

	if ep.RecordType == endpoint.RecordTypeA {
		result.Address = ep.Targets[0]
	} else if ep.RecordType == endpoint.RecordTypeCNAME {
		result.CName = ep.Targets[0]
	} else if ep.RecordType == endpoint.RecordTypeTXT {
		result.TxtData = ep.Targets[0]
	}

	return &result
}
func endpointToRecord ( ep * endpoint . Endpoint ) * dynect . DataBlock { result := dynect . DataBlock { } if ep . RecordType == endpoint . RecordTypeA { result . Address = ep . Targets [ 0 ] } else if ep . RecordType == endpoint . RecordTypeCNAME { result . CName = ep . Targets [ 0 ] } else if ep . RecordType == endpoint . RecordTypeTXT { result . TxtData = ep . Targets [ 0 ] } return & result }
// endpointToRecord puts the Target of an Endpoint in the correct field of DataBlock.
// See DataBlock comments for more info
endpointToRecord puts the Target of an Endpoint in the correct field of DataBlock . See DataBlock comments for more info