summaryrefslogtreecommitdiffstats
path: root/nws/nws.go
diff options
context:
space:
mode:
authorsiddharth ravikumar <s@ricketyspace.net>2022-06-18 03:18:13 -0400
committersiddharth ravikumar <s@ricketyspace.net>2022-06-18 03:18:13 -0400
commitb2cfb74403b0052b51477a0200c77f8b5f5270ed (patch)
tree9cad829659f836ef6fe1b2508b8f0d6d249fc181 /nws/nws.go
parent8b8f6d4adc105a8249157842512e3f90e8aa3190 (diff)
nws: update `GetForecastBundle`
Add alerts to the bundle.
Diffstat (limited to 'nws/nws.go')
-rw-r--r--nws/nws.go6
1 files changed, 6 insertions, 0 deletions
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
}