From b2cfb74403b0052b51477a0200c77f8b5f5270ed Mon Sep 17 00:00:00 2001 From: siddharth ravikumar Date: Sat, 18 Jun 2022 03:18:13 -0400 Subject: nws: update `GetForecastBundle` Add alerts to the bundle. --- nws/nws.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nws/nws.go b/nws/nws.go index 7caecc9..ecef792 100644 --- a/nws/nws.go +++ b/nws/nws.go @@ -87,6 +87,7 @@ type ForecastBundle struct { Point *Point Forecast *Forecast ForecastHourly *Forecast + Alerts *FeatureCollection } var pCache *cache.Cache @@ -143,10 +144,15 @@ func GetForecastBundle(lat, lng float32) (*ForecastBundle, *Error) { Detail: err.Error(), } } + a, nwsErr := GetAlerts(lat, lng) + if nwsErr != nil { + return nil, nwsErr + } return &ForecastBundle{ Point: p, Forecast: f, ForecastHourly: fh, + Alerts: a, }, nil } -- cgit v1.2.3