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.
Example
package main
import (
"fmt"
"net"
)
func main() {
ptr, _ := net.LookupAddr("6.8.8.8")
for _, ptrvalue := range ptr {
fmt.Println(ptrvalue)
}
}
For the given address the above program returns a single reverse record as shown below:
tms_server.yuma.army.mil