aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJonathan DeMasi <jon.demasi@colorado.edu>2019-06-05 12:01:34 -0600
committerJonathan DeMasi <jon.demasi@colorado.edu>2019-06-05 12:01:34 -0600
commit4b9c9759d097a38e87e4ae85db8c139707e9034a (patch)
treed724abfbd33490601541702ec2ffb839c0b8a608 /main.go
parent372e8ee5619f872c5d9e641fb354ebea6ceacb58 (diff)
downloadgh_authkey_checker-4b9c9759d097a38e87e4ae85db8c139707e9034a.tar
gh_authkey_checker-4b9c9759d097a38e87e4ae85db8c139707e9034a.tar.gz
gh_authkey_checker-4b9c9759d097a38e87e4ae85db8c139707e9034a.tar.bz2
gh_authkey_checker-4b9c9759d097a38e87e4ae85db8c139707e9034a.tar.lz
gh_authkey_checker-4b9c9759d097a38e87e4ae85db8c139707e9034a.tar.xz
gh_authkey_checker-4b9c9759d097a38e87e4ae85db8c139707e9034a.tar.zst
gh_authkey_checker-4b9c9759d097a38e87e4ae85db8c139707e9034a.zip
added some logging and straight up failure
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 4 insertions, 1 deletions
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
}