Skip to content

Instantly share code, notes, and snippets.

@estesp
Created June 5, 2015 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save estesp/89ec461423e3d4e10ab4 to your computer and use it in GitHub Desktop.
Save estesp/89ec461423e3d4e10ab4 to your computer and use it in GitHub Desktop.
Improperly named lookup test which actually doesn't use `net.Dial()`
package main
import (
"fmt"
"net"
"os"
)
func main() {
addrs, err := net.LookupIP(os.Args[1])
if err != nil {
fmt.Println(err)
os.Exit(1)
}
for _, addr := range addrs {
fmt.Printf("addr: %s\n", addr)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment