title: Get domain name from IP address in Go
body: <p>I'm trying to resolve the host name from an IP address, which is apparently proving to be a little more challenging than I thought it'd be.</p>
  
  <p>I've tried using a couple of functions, including the <code>net.LookupHost</code> method, but all of them seem to be just returning the IP address which I input.</p>
  
  <p>Here's the code which I am using:</p>
  
  <pre><code>package main
  
  import (
      "fmt"
      "net"
  )
  
  func main() {
      // obtained from ping -c 1 stackoverflow.com, should print "stackoverflow.com"
      addr, err := net.LookupHost("198.252.206.16")
      fmt.Println(addr, err)
  }
  </code></pre>