From b559a01fd613cea1174e05864e673730308f6203 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Wed, 11 Feb 2015 23:40:52 -0500 Subject: [PATCH] Fix whitespace in `where` --- where/where.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/where/where.go b/where/where.go index 1b19938..0da3fc0 100644 --- a/where/where.go +++ b/where/where.go @@ -109,17 +109,17 @@ func getTimeInZone(tz string) string { func getGeo(u *User) { fmt.Printf("Fetching %s location...\n", u.Name) - response, err := http.Get(fmt.Sprintf("https://freegeoip.net/json/%s", u.IP)) - if err != nil { - fmt.Printf("%s", err) - os.Exit(1) - } else { - defer response.Body.Close() - contents, err := ioutil.ReadAll(response.Body) - if err != nil { - fmt.Printf("%s", err) - os.Exit(1) - } + response, err := http.Get(fmt.Sprintf("https://freegeoip.net/json/%s", u.IP)) + if err != nil { + fmt.Printf("%s", err) + os.Exit(1) + } else { + defer response.Body.Close() + contents, err := ioutil.ReadAll(response.Body) + if err != nil { + fmt.Printf("%s", err) + os.Exit(1) + } var dat map[string]interface{} @@ -133,7 +133,7 @@ func getGeo(u *User) { u.CurrentTime = getTimeInZone(dat["time_zone"].(string)) u.Region = region u.Country = country - } + } } func prettyLocation(region, country string) string {