Skip to content

Commit

Permalink
forecast.io backend: clarify lat,lon-pair usage
Browse files Browse the repository at this point in the history
  • Loading branch information
schachmat committed Apr 14, 2016
1 parent 798bb28 commit a033b47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backends/forecast.io.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func (c *forecastConfig) Fetch(location string, numdays int) iface.Data {
log.Fatal("No forecast.io API key specified.\nYou have to register for one at https://developer.forecast.io/register")
}
if matched, err := regexp.MatchString(`^-?[0-9]*(\.[0-9]+)?,-?[0-9]*(\.[0-9]+)?$`, location); !matched || err != nil {
log.Fatalf("Error: The forecast.io backend only supports latitude,longitude pairs as location.\nTry `40.748,-73.985` instead of `%s` to get weather for New York", location)
log.Fatalf("Error: The forecast.io backend only supports latitude,longitude pairs as location.\nInstead of `%s` try `40.748,-73.985` for example to get a forecast for New York", location)
}

c.tz = time.Local
Expand Down

0 comments on commit a033b47

Please sign in to comment.