From 4b9c9759d097a38e87e4ae85db8c139707e9034a Mon Sep 17 00:00:00 2001 From: Jonathan DeMasi Date: Wed, 5 Jun 2019 12:01:34 -0600 Subject: added some logging and straight up failure --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index fd775d8..38fbe3c 100644 --- a/main.go +++ b/main.go @@ -49,7 +49,7 @@ func fetchKeys(username string) string { // Need to fix this to not be an infinite loop func checkResolvers() { - i := 0 + i := 1 for i < 3 { _, err := net.LookupIP("github.com") if err != nil { @@ -60,6 +60,9 @@ func checkResolvers() { break } } + if i == 3 { + log.Fatalln("Could not reliably lookup host github.com") + } return } -- cgit v1.2.3