Go program to find TXT records of a domain

This text record stores information about the SPF that can identify the authorized server to send email on behalf of your organization. The net.LookupTXT() function takes a domain name(facebook.com) as a string and returns a list of DNS TXT records as a slice of strings.


package main
import (
func main() {
	txtrecords, _ := net.LookupTXT("facebook.com")
	for _, txt := range txtrecords {

The single TXT record for gmail.com is shown below:

v=spf1 redirect=_spf.facebook.com
Most Helpful This Week