Golang net.LookupAddr() function example

package net

Golang net.LookupAddr() function usage example

 package main

 import (
 "fmt"
 "net"
 )

 func main() {
 // should print "socketloop.com, <nil>"
 addr, err := net.LookupAddr("162.243.5.230")
 fmt.Println(addr, err)
 }

References :

http://golang.org/pkg/net/#LookupAddr

https://www.socketloop.com/tutorials/golang-get-host-name-or-domain-name-from-ip-address

Advertisement