package main import ( "fmt" "log" easydns "deadbeef.codes/steven/goeasydns" ) func main() { client := easydns.NewClient("https://sandbox.rest.easydns.net", "APITOKEN", "APIKEY") //change url to remove sandbox once you contact easydns support recordList, err := client.GetRecordList("myeasydnssite.ca") if err != nil { log.Fatalf("failed to get records for myeasydnssite.ca: %v", err) } for _, record := range recordList.Data { if record.Type == "TXT" { fmt.Printf("ID: %s\n", record.ID) fmt.Printf("Host: %s\n", record.Host) fmt.Printf("Type: %s\n", record.Type) fmt.Printf("rdata: %s\n", record.Rdata) fmt.Printf("\n\n") } } }