func cloudflareCreateDNS(api *cloudflare.API, DNS string, externalIP IP, zoneID string) (*cloudflare.DNSRecordResponse, error) {
	// Set the correct DNSRecordType
	recordType, err := getDNSRecordType(externalIP)
	if err != nil {
		return &cloudflare.DNSRecordResponse{}, err
	}

	dnsRecord := cloudflare.DNSRecord{
		Name:    DNS,
		Content: externalIP.String,
		Type:    recordType,
		Proxied: false,
		TTL:     120,
	}

	log.Debugf("Creating new DNS %s Record for %s to IP %s", recordType, DNS, externalIP.String)
	return api.CreateDNSRecord(zoneID, dnsRecord)
}
// Created a new DNSRecord at Cloudflare
Created a new DNSRecord at Cloudflare
// Created a new DNSRecord at Cloudflare
func cloudflareCreateDNS(api *cloudflare.API, DNS string, externalIP IP, zoneID string) (*cloudflare.DNSRecordResponse, error) {
	recordType, err := getDNSRecordType(externalIP)
	if err != nil {
		return &cloudflare.DNSRecordResponse{}, err
	}
	dnsRecord := cloudflare.DNSRecord{
		Name:    DNS,
		Content: externalIP.String,
		Type:    recordType,
		Proxied: false,
		TTL:     120,
	}
	log.Debugf("Creating new DNS %s Record for %s to IP %s", recordType, DNS, externalIP.String)
	return api.CreateDNSRecord(zoneID, dnsRecord)
}
func cloudflareCreateDNS ( api * cloudflare . API , DNS string , externalIP IP , zoneID string ) ( * cloudflare . DNSRecordResponse , error ) { recordType , err := getDNSRecordType ( externalIP ) if err != nil { return & cloudflare . DNSRecordResponse { } , err } dnsRecord := cloudflare . DNSRecord { Name : DNS , Content : externalIP . String , Type : recordType , Proxied : false , TTL : 120 , } log . Debugf ( " " , recordType , DNS , externalIP . String ) return api . CreateDNSRecord ( zoneID , dnsRecord ) }
Created a new DNSRecord at Cloudflare
Created a new DNSRecord at Cloudflare
// Set the correct DNSRecordType