summaryrefslogtreecommitdiffstats
path: root/weather/weather.go
diff options
context:
space:
mode:
Diffstat (limited to 'weather/weather.go')
-rw-r--r--weather/weather.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/weather/weather.go b/weather/weather.go
index c3f48a3..e001255 100644
--- a/weather/weather.go
+++ b/weather/weather.go
@@ -47,8 +47,8 @@ type WeatherTimeline struct {
type Alert struct {
Event string
Severity string
- Description string
- Instruction string
+ Description []string
+ Instruction []string
}
func NewWeather(lat, lng float32) (*Weather, error, int) {
@@ -125,12 +125,11 @@ func NewWeather(lat, lng float32) (*Weather, error, int) {
a := Alert{
Event: f.Properties.Event,
Severity: f.Properties.Severity,
- Description: f.Properties.Description,
- Instruction: f.Properties.Instruction,
+ Description: strings.Split(f.Properties.Description, "\n\n"),
+ Instruction: strings.Split(f.Properties.Instruction, "\n\n"),
}
w.Alerts = append(w.Alerts, a)
}
}
-
return w, nil, 200
}