Skip to content

Commit

Permalink
hide forecast, if 0 is given as argument
Browse files Browse the repository at this point in the history
  • Loading branch information
schachmat committed May 15, 2015
1 parent 8af72c0 commit 10d6ea5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions we.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,9 @@ func main() {
fmt.Fprintln(stdout, val)
}

if numdays == 0 {
return
}
if r.Data.Weather == nil {
log.Fatal("No detailed weather forecast available.")
}
Expand Down

0 comments on commit 10d6ea5

Please # to comment.