From f3813503b748eba2877e730c53c91549ca2c6da5 Mon Sep 17 00:00:00 2001 From: siddharth ravikumar Date: Sat, 28 May 2022 04:17:11 -0400 Subject: peach: update Weather Add a Title field. --- main.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index 574c72f..11cde3b 100644 --- a/main.go +++ b/main.go @@ -35,6 +35,7 @@ var peachTemplates = template.Must(template.ParseFS(peachFS, "templates/*.tmpl") var latLngRegex = regexp.MustCompile(`/(-?[0-9]+\.?[0-9]+?),(-?[0-9]+\.?[0-9]+)`) type Weather struct { + Title string Location string Now WeatherNow Period WeatherPeriod @@ -137,6 +138,7 @@ func NewWeather(point *nws.NWSPoint, f, fh *nws.NWSForecast) (*Weather, error) { strings.ToLower(point.Properties.RelativeLocation.Properties.City), strings.ToLower(point.Properties.RelativeLocation.Properties.State), ) + w.Title = w.Location w.Now = WeatherNow{ Temperature: fh.Properties.Periods[0].Temperature, TemperatureUnit: fh.Properties.Periods[0].TemperatureUnit, -- cgit v1.2.3