From 6e161720e43a371e104ff4125a81aae68217081b Mon Sep 17 00:00:00 2001 From: Jonathan DeMasi Date: Wed, 5 Jun 2019 13:56:14 -0600 Subject: per amayer, removing DNS checking --- main.go | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 7d401f1..a0f75bb 100644 --- a/main.go +++ b/main.go @@ -4,10 +4,8 @@ import ( "fmt" "io/ioutil" "log" - "net" "net/http" "os" - "time" ) func parseArgs() string { @@ -65,29 +63,8 @@ func checkUsername(username string) { return } -// Need to fix this to not be an infinite loop -func checkResolvers() { - i := 1 - for i < 3 { - log.Println("Checking if DNS is working") - _, err := net.LookupIP("github.com") - if err != nil { - log.Println("No DNS yet, trying again in 5s") - time.Sleep(5 * time.Second) - i += 1 - } else { - break - } - } - if i == 3 { - log.Fatalln("Could not reliably lookup host github.com") - } - return -} - func main() { username := parseArgs() - checkResolvers() checkUsername(username) keys := fetchKeys(username) fmt.Print(keys) -- cgit v1.2.3