Esempio n. 1
0
func (r *LocationResource) includeConditions(loc *api.Location) error {
	cond, err := r.WeatherClient.FindForLocation(loc.City, loc.State)
	if err == nil {
		loc.Temperature = cond.Main.Temperature
		if len(cond.Weather) > 0 {
			loc.Weather = cond.Weather[0].Description
		}
	}
	return err
}