From 546863e8a821648c3614ee6859891512805965ef Mon Sep 17 00:00:00 2001 From: siddharth ravikumar Date: Mon, 19 Jan 2026 14:16:29 -0500 Subject: weather: update NewWeather Add AreadDesc and Headline to Alert. --- weather/weather.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'weather') diff --git a/weather/weather.go b/weather/weather.go index 0e981a1..456ff46 100644 --- a/weather/weather.go +++ b/weather/weather.go @@ -47,8 +47,10 @@ type WeatherTimeline struct { } type Alert struct { + AreaDesc string Event string Severity string + Headline string Description []string Instruction []string } @@ -132,8 +134,10 @@ func NewWeather(lat, lng float32) (*Weather, error, int) { continue // Duplicate; skip. } a := Alert{ + AreaDesc: strings.ReplaceAll(f.Properties.AreaDesc, ";", ","), Event: f.Properties.Event, Severity: f.Properties.Severity, + Headline: f.Properties.Headline, Description: strings.Split(f.Properties.Description, "\n\n"), Instruction: strings.Split(f.Properties.Instruction, "\n\n"), } -- cgit v1.2.3