Golang ProgramsGolang Programs

Go program to find PTR pointer record of a domain

These records provide the reverse binding from addresses to names. PTR records should exactly match the forward maps. The net.LookupAddr() function performs a reverse finding for the address and returns a list of names that map to the given address.
package main
import (
func main() {
	ptr, _ := net.LookupAddr("")
	for _, ptrvalue := range ptr {

For the given address the above program returns a single reverse record as shown below:

C:\golang\dns>go run example3.go