func (c *Client) CreateDNSDomain(domain, serverIP string) error {
	values := url.Values{
		"domain":   {domain},
		"serverip": {serverIP},
	}
	if err := c.post(`dns/create_domain`, values, nil); err != nil {
		return err
	}
	return nil
}
CreateDNSDomain creates a new DNS domain name on Vultr
package lib
import (
	"fmt"
	"net/url"
	"sort"
	"strings"
)
type DNSDomain struct {
	Domain  string `json:"domain"`
	Created string `json:"date_created"`
}
type dnsdomains []DNSDomain
func (d dnsdomains) Len() int      { return len(d) }
func (d dnsdomains) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
func (d dnsdomains) Less(i, j int) bool {
	return strings.ToLower(d[i].Domain) < strings.ToLower(d[j].Domain)
}
type DNSRecord struct {
	RecordID int    `json:"RECORDID"`
	Type     string `json:"type"`
	Name     string `json:"name"`
	Data     string `json:"data"`
	Priority int    `json:"priority"`
	TTL      int    `json:"ttl"`
}
type dnsrecords []DNSRecord
func (d dnsrecords) Len() int      { return len(d) }
func (d dnsrecords) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
func (d dnsrecords) Less(i, j int) bool {
	if d[i].Type < d[j].Type {
		return true
	} else if d[i].Type > d[j].Type {
		return false
	}
	if d[i].Data < d[j].Data {
		return true
	} else if d[i].Data > d[j].Data {
		return false
	}
	return strings.ToLower(d[i].Name) < strings.ToLower(d[j].Name)
}
func (c *Client) GetDNSDomains() (domains []DNSDomain, err error) {
	if err := c.get(`dns/list`, &domains); err != nil {
		return nil, err
	}
	sort.Sort(dnsdomains(domains))
	return domains, nil
}
func (c *Client) GetDNSRecords(domain string) (records []DNSRecord, err error) {
	if err := c.get(`dns/records?domain=`+domain, &records); err != nil {
		return nil, err
	}
	sort.Sort(dnsrecords(records))
	return records, nil
}