summaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorsiddharth <s@ricketyspace.net>2022-05-22 19:21:47 -0400
committersiddharth <s@ricketyspace.net>2022-05-22 19:21:47 -0400
commitd326040032414fd3cd4d14a9f1ca3bc3d1ffd7bc (patch)
treef48e383add92b80fe228fdd70abf49945eea163a /main.go
parent46f9a5d623d0bdb6fc11fe2e6b4861a7fdedf6ce (diff)
peach: update comments
make 'em all lowercase.
Diffstat (limited to 'main.go')
-rw-r--r--main.go9
1 files 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 {