Created
June 5, 2015 15:30
-
-
Save estesp/89ec461423e3d4e10ab4 to your computer and use it in GitHub Desktop.
Improperly named lookup test which actually doesn't use `net.Dial()`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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