You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: query.go
    path of file: ./repos/jaeles/dns
    
    the code of the file until where you have to start completion: package dns

import (
	"github.com/jaeles-project/jaeles/libs"
	"github.com/jaeles-project/jaeles/utils"
	"github.com/lixiangzhong/dnsutil"
	"github.com/thoas/go-funk"
)

var recordMap = map[string]uint16{
	"A":     1,
	"AAAA":  28,
	"NS":    2,
	"CNAME": 5,
	"SOA":   6,
	"PTR":   12,
	"MX":    15,
	"TXT":   16,
}

var CommonResolvers = []string{
	"1.1.1.1", // Cloudflare
	"8.8.8.8", // Google
	"8.8.4.4", // Google
}

func QueryDNS(dnsRecord *libs.Dns, options libs.Options) {
	resolver := options.Resolver
	if resolver == "" {
		index := funk.RandomInt(0, len(CommonResolvers))
		resolver = CommonResolvers[index]
	}
	domain := dnsRecord.Domain
	queryType := dnsRecord.RecordType
	dnsRecord.Resolver = resolver

	var dig dnsutil.Dig
	dig.Retry = options.Retry
	dig.SetDNS(dnsRecord.Resolver)
	utils.InforF("[resolved] %v -- %v", domain, queryType)

	if queryType == "ANY" || queryType == "" {
		for k, v := range recordMap {
			var dnsResult libs.DnsResult
			msg, err := dig.GetMsg(v, domain)
			if err != nil 
    
func QueryDNS(dnsRecord *libs.Dns, options libs.Options) {
	resolver := options.Resolver
	if resolver == "" {
		index := funk.RandomInt(0, len(CommonResolvers))
		resolver = CommonResolvers[index]
	}
	domain := dnsRecord.Domain
	queryType := dnsRecord.RecordType
	dnsRecord.Resolver = resolver

	var dig dnsutil.Dig
	dig.Retry = options.Retry
	dig.SetDNS(dnsRecord.Resolver)
	utils.InforF("[resolved] %v -- %v", domain, queryType)

	if queryType == "ANY" || queryType == "" {
		for k, v := range recordMap {
			var dnsResult libs.DnsResult
			msg, err := dig.GetMsg(v, domain)
			if err != nil {
				utils.DebugF("err to resolved: %v -- %v", domain, err)
				return
			}
			dnsResult.Data = msg.String()
			//utils.DebugF(dnsResult.Data)
			dnsResult.RecordType = k
			dnsRecord.Results = append(dnsRecord.Results, dnsResult)
		}
	} else {
		var dnsResult libs.DnsResult
		msg, err := dig.GetMsg(recordMap[queryType], domain)
		if err != nil {
			utils.DebugF("err to resolved: %v -- %v", domain, err)
			return
		}
		dnsResult.Data = msg.String()
		//utils.DebugF(dnsResult.Data)
		dnsResult.RecordType = queryType
		dnsRecord.Results = append(dnsRecord.Results, dnsResult)
	}

	return
}