diff options
author | Jonathan DeMasi <jon.demasi@colorado.edu> | 2019-06-05 13:56:14 -0600 |
---|---|---|
committer | Jonathan DeMasi <jon.demasi@colorado.edu> | 2019-06-05 13:56:14 -0600 |
commit | 6e161720e43a371e104ff4125a81aae68217081b (patch) | |
tree | 45bf02a914a8ed1040e849fd508b506cc8d70692 | |
parent | 329e1848da07383ed695077ea5007a884882b30c (diff) | |
download | gh_authkey_checker-6e161720e43a371e104ff4125a81aae68217081b.tar gh_authkey_checker-6e161720e43a371e104ff4125a81aae68217081b.tar.gz gh_authkey_checker-6e161720e43a371e104ff4125a81aae68217081b.tar.bz2 gh_authkey_checker-6e161720e43a371e104ff4125a81aae68217081b.tar.lz gh_authkey_checker-6e161720e43a371e104ff4125a81aae68217081b.tar.xz gh_authkey_checker-6e161720e43a371e104ff4125a81aae68217081b.tar.zst gh_authkey_checker-6e161720e43a371e104ff4125a81aae68217081b.zip |
per amayer, removing DNS checking
-rw-r--r-- | main.go | 23 |
1 files changed, 0 insertions, 23 deletions
@@ -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) |