import ( "fmt" "github.com/miekg/dns" "net" ) func main() { // create a new client and set the server address c := dns.Client{} server := "8.8.8.8:53" // create a new query message for the google.com domain m := &dns.Msg{} m.SetQuestion(dns.Fqdn("google.com"), dns.TypeA) // send the query message to the server r, _, err := c.Exchange(m, server) if err != nil { fmt.Println("error:", err) return } // print the response message for _, a := range r.Answer { if ans, ok := a.(*dns.A); ok { fmt.Println(ans.A) } } }In this example, we create a new DNS client and set the server address to `8.8.8.8:53`, which is the public DNS server operated by Google. We then create a new query message for the `google.com` domain and send it to the server using the `Exchange()` method. Finally, we print the IPv4 address returned in the response message. The `github.com/miekg/dns` package is a popular DNS library in the Go community and is commonly used in networking applications to perform DNS lookups and resolve domain names to IP addresses.