diff options
author | siddharth ravikumar <s@ricketyspace.net> | 2022-06-18 03:18:13 -0400 |
---|---|---|
committer | siddharth ravikumar <s@ricketyspace.net> | 2022-06-18 03:18:13 -0400 |
commit | b2cfb74403b0052b51477a0200c77f8b5f5270ed (patch) | |
tree | 9cad829659f836ef6fe1b2508b8f0d6d249fc181 /nws/nws.go | |
parent | 8b8f6d4adc105a8249157842512e3f90e8aa3190 (diff) |
nws: update `GetForecastBundle`
Add alerts to the bundle.
Diffstat (limited to 'nws/nws.go')
-rw-r--r-- | nws/nws.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 } |