<commit_before>package shodan

import (
	"strings"
)

type DnsResolved map[string]string
type DnsReversed map[string][]string

type dnsResolveOptions struct {
	Hostnames string `url:"hostnames"`
}

type dnsReverseOptions struct {
	Ips string `url:"ips"`
}

const (
	resolvePath = "/dns/resolve"
	reversePath = "/dns/reverse"
)

func (c *Client) GetDnsResolve(hostnames []string) (*DnsResolved, error) {
	options := &dnsResolveOptions{
		Hostnames: strings.Join(hostnames, ","),
	}
	url, err := c.buildUrl(resolvePath, options)
	if err != nil {
		return nil, err
	}

	var dnsResolved DnsResolved
	err = c.executeRequest("GET", url, &dnsResolved)

	return &dnsResolved, err
}

func (c *Client) GetDnsReverse(ips []string) (*DnsReversed, error) {
	options := &dnsReverseOptions{
		Ips: strings.Join(ips, ","),
	}
	url, err := c.buildUrl(reversePath, options)
	if err != nil {
		return nil, err
	}

	var dnsReversed DnsReversed
	err = c.executeRequest("GET", url, &dnsReversed)

	return &dnsReversed, err
}<commit_msg>return map from dns methods (not pointer)<commit_after>package shodan

import (
	"strings"
)

type DnsResolved map[string]string
type DnsReversed map[string][]string

type dnsResolveOptions struct {
	Hostnames string `url:"hostnames"`
}

type dnsReverseOptions struct {
	Ips string `url:"ips"`
}

const (
	resolvePath = "/dns/resolve"
	reversePath = "/dns/reverse"
)

func (c *Client) GetDnsResolve(hostnames []string) (DnsResolved, error) {
	options := &dnsResolveOptions{
		Hostnames: strings.Join(hostnames, ","),
	}
	url, err := c.buildUrl(resolvePath, options)
	if err != nil {
		return nil, err
	}

	dnsResolved := make(DnsResolved)
	err = c.executeRequest("GET", url, &dnsResolved)

	return dnsResolved, err
}

func (c *Client) GetDnsReverse(ips []string) (DnsReversed, error) {
	options := &dnsReverseOptions{
		Ips: strings.Join(ips, ","),
	}
	url, err := c.buildUrl(reversePath, options)
	if err != nil {
		return nil, err
	}

	dnsReversed := make(DnsReversed)
	err = c.executeRequest("GET", url, &dnsReversed)

	return dnsReversed, err
}
{'fraction_non_alphanumeric': 0.13773035887487875, 'fraction_numerical': 0.0, 'mean_word_length': 5.014577259475218, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6560152', 'n_tokens_mistral': 798, 'n_tokens_neox': 767, 'n_words': 182}