func (q *queryConf) hostqlist(name string) (list []string) {
	labels, err := dns.Labels(name)
	if err != nil {
		if q.Resolver.log.Level >= dns.LOG_ERRORS {
			q.Resolver.log.Log("FAIL %s: %s", name, err)
		}
		return
	}

	dots := len(labels) - 1
	ndots := int(q.Conf.Opt.Ndots)
	domain := q.Conf.Domain
	if domain == "" {
		domain = dns.Host2domain(q.Resolver.hostName)
	}
	rooted := dns.IsRooted(name)
	if rooted || dots >= ndots {
		list = append(list, name) // initial absolute query
	}
	if !rooted && dots < ndots {
		rname := dns.RootedName(name)
		if domain != "" {
			list = append(list, rname+domain)
		}
		list = append(list, name)
		for _, s := range q.Conf.Search {
			list = append(list, rname+s)
		}
	}
	return
}
// Build a query task list from a hostname.
Build a query task list from a hostname.
// Build a query task list from a hostname .
func (q *queryConf) hostqlist(name string) (list []string) {
	labels, err := dns.Labels(name)
	if err != nil {
		if q.Resolver.log.Level >= dns.LOG_ERRORS {
			q.Resolver.log.Log("FAIL %s: %s", name, err)
		}
		return
	}
	dots := len(labels) - 1
	ndots := int(q.Conf.Opt.Ndots)
	domain := q.Conf.Domain
	if domain == "" {
		domain = dns.Host2domain(q.Resolver.hostName)
	}
	rooted := dns.IsRooted(name)
	if rooted || dots >= ndots {
		list = append(list, name) 
	}
	if !rooted && dots < ndots {
		rname := dns.RootedName(name)
		if domain != "" {
			list = append(list, rname+domain)
		}
		list = append(list, name)
		for _, s := range q.Conf.Search {
			list = append(list, rname+s)
		}
	}
	return
}
func ( q * queryConf ) hostqlist ( name string ) ( list [ ] string ) { labels , err := dns . Labels ( name ) if err != nil { if q . Resolver . log . Level >= dns . LOG_ERRORS { q . Resolver . log . Log ( " " , name , err ) } return } dots := len ( labels ) - 1 ndots := int ( q . Conf . Opt . Ndots ) domain := q . Conf . Domain if domain == " " { domain = dns . Host2domain ( q . Resolver . hostName ) } rooted := dns . IsRooted ( name ) if rooted || dots >= ndots { list = append ( list , name ) } if ! rooted && dots < ndots { rname := dns . RootedName ( name ) if domain != " " { list = append ( list , rname + domain ) } list = append ( list , name ) for _ , s := range q . Conf . Search { list = append ( list , rname + s ) } } return }
Build a query task list from a hostname.
Build a query task list from a hostname .
// initial absolute query