diff options
author | siddharth <s@ricketyspace.net> | 2022-05-22 20:51:08 -0400 |
---|---|---|
committer | siddharth <s@ricketyspace.net> | 2022-05-22 20:51:08 -0400 |
commit | b5b902b02ebe60b771495378a173f9a5d4ee176b (patch) | |
tree | 5e011e142f1c537f8720851a2dca534f4643d5b9 /main.go | |
parent | 6c1b32cfcf028a8cd4e0a4b2fd38f96658ac3ea0 (diff) |
templates: update weather template
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -12,6 +12,7 @@ import ( "net/http" "regexp" "strconv" + "strings" "time" "ricketyspace.net/peach/nws" @@ -133,8 +134,8 @@ func showWeather(w http.ResponseWriter, lat, lng float32) { func NewWeather(point *nws.NWSPoint, f, fh *nws.NWSForecast) (*Weather, error) { w := new(Weather) w.Location = fmt.Sprintf("%s, %s", - point.Properties.RelativeLocation.Properties.City, - point.Properties.RelativeLocation.Properties.State, + strings.ToLower(point.Properties.RelativeLocation.Properties.City), + strings.ToLower(point.Properties.RelativeLocation.Properties.State), ) w.Now = WeatherNow{ Temperature: fh.Properties.Periods[0].Temperature, |