Skip to content

Commit 003d369

Browse files
committed
Add 'No trams' in case of no forecast
1 parent 775947c commit 003d369

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/forecast.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ func printOutput(format string, stop *luas.Stop, stopInfo *luas.StopInfo) {
4545
for _, direction := range stopInfo.Directions {
4646
output.Infof("Direction: %s", direction.Name)
4747
for _, tram := range direction.Trams {
48-
if tram.DueMins == "DUE" {
48+
if tram.Destination == "No trams forecast" {
49+
output.Warnf("No trams")
50+
} else if tram.DueMins == "DUE" {
4951
output.Infof("Destination: %s, due to arrive", tram.Destination, tram.DueMins)
5052
} else {
5153
output.Infof("Destination: %s, due in %s minutes", tram.Destination, tram.DueMins)

0 commit comments

Comments
 (0)