mirror of
https://github.com/folbricht/routedns.git
synced 2026-04-25 18:08:30 -05:00
12 lines
191 B
Go
12 lines
191 B
Go
package rdns
|
|
|
|
import "github.com/miekg/dns"
|
|
|
|
// Return the query name from a DNS query.
|
|
func qName(q *dns.Msg) string {
|
|
if len(q.Question) == 0 {
|
|
return ""
|
|
}
|
|
return q.Question[0].Name
|
|
}
|