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
Something interesting
Tutorials
+6.7k Golang : When to use make or new?
+12.2k Linux : How to install driver for 600Mbps Dual Band Wifi USB Adapter
+22.2k Golang : Convert seconds to minutes and remainder seconds
+11.9k Golang : Determine if time variables have same calendar day
+7.9k Golang Hello World Example
+5.4k Golang *File points to a file or directory ?
+24.5k Golang : GORM read from database example
+4.4k Linux/MacOSX : Search and delete files by extension
+15.9k Golang : Read a file line by line
+5.9k Unix/Linux : How to open tar.gz file ?
+16.3k Golang : How to extract links from web page ?
+28.7k Golang : Detect (OS) Operating System