From c3d0451d6292ac2ef74c2ab9bc69c35580e68b04 Mon Sep 17 00:00:00 2001 From: sneak Date: Tue, 8 Sep 2020 22:06:01 -0700 Subject: [PATCH] typos --- bot/aqi.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot/aqi.go b/bot/aqi.go index 74f274d..8efa63f 100644 --- a/bot/aqi.go +++ b/bot/aqi.go @@ -47,7 +47,7 @@ func (b *Bot) HandleAirQualityRequest(channelid string, postid string, message s zip4 := matches[1] apikey := os.Getenv("AIRNOW_API_KEY") - url := fmt.Sprintf("http://www.airnowapi.org/aq/observation/zipCode/current/?format=application/json&zipCode=%d&distance=25&API_KEY=%s", zip4, apikey) + url := fmt.Sprintf("http://www.airnowapi.org/aq/observation/zipCode/current/?format=application/json&zipCode=%s&distance=25&API_KEY=%s", zip4, apikey) log.Info().Msgf("calculated url: `%s`", url) @@ -71,7 +71,7 @@ func (b *Bot) HandleAirQualityRequest(channelid string, postid string, message s var parsedAQIResponse AQIResponse - log.Info().Msgf("aqi %s: %s", zip, data) + log.Info().Msgf("aqi %s: %s", zip4, data) err = nil err = json.Unmarshal([]byte(data), &parsedAQIResponse) @@ -80,5 +80,5 @@ func (b *Bot) HandleAirQualityRequest(channelid string, postid string, message s b.SendMsgToChannel("error deserializing AQI data", postid, channelid) return } - b.SendMsgToChannel(fmt.Sprintf("AQI for `%s`: \n```\n%+v\n```\n", loc, parsedAQIResponse), postid, channelid) + b.SendMsgToChannel(fmt.Sprintf("AQI for `%s`: \n```\n%+v\n```\n", zip4, parsedAQIResponse), postid, channelid) }