From d326040032414fd3cd4d14a9f1ca3bc3d1ffd7bc Mon Sep 17 00:00:00 2001 From: siddharth Date: Sun, 22 May 2022 19:21:47 -0400 Subject: peach: update comments make 'em all lowercase. --- main.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 36e2b6f..e67f0ed 100644 --- a/main.go +++ b/main.go @@ -103,7 +103,7 @@ func showWeather(w http.ResponseWriter, lat, lng float32) { return } - // Get forecast + // get forecast f, err := nws.Forecast(point) if err != nil { http.Error(w, err.Error(), 500) @@ -115,13 +115,14 @@ func showWeather(w http.ResponseWriter, lat, lng float32) { return } - // Make weather + // make weather weather, err := NewWeather(point, f, fh) if err != nil { http.Error(w, err.Error(), 500) return } + // render. err = peachTemplates.ExecuteTemplate(w, "weather.tmpl", weather) if err != nil { http.Error(w, err.Error(), 500) @@ -146,12 +147,12 @@ func NewWeather(point *nws.NWSPoint, f, fh *nws.NWSForecast) (*Weather, error) { Forecast: f.Properties.Periods[0].DetailedForecast, } - // Build timeline. + // build timeline. periods := []WeatherPeriod{} max := 12 for i, period := range fh.Properties.Periods { if i%2 != 0 { - continue // Take every other period + continue // take every other period } t, err := time.Parse(time.RFC3339, period.StartTime) if err != nil { -- cgit v1.2.3