code: func suitableType(target string) string {
  	if net.ParseIP(target) != nil {
  		return endpoint.RecordTypeA
  	}
  	return endpoint.RecordTypeCNAME
  }
docs: // suitableType returns the DNS resource record type suitable for the target.
  // In this case type A for IPs and type CNAME for everything else.