updated types

This commit is contained in:
Paul Lecuq 2019-08-12 18:18:32 +02:00
parent 017ec0a38b
commit 0a64a2100a
2 changed files with 3 additions and 3 deletions

View File

@ -81,8 +81,8 @@ func FetchData(wc *WeatherConfig, city string) (Data, error) {
}
d.Points = map[string]interface{}{"temperature": d.Main.Temperature,
"humidity": float64(d.Main.Humidity),
"pressure": float64(d.Main.Pressure)}
"humidity": d.Main.Humidity,
"pressure": d.Main.Pressure}
return d, nil
}

View File

@ -18,7 +18,7 @@ type Data struct {
City string `json:"name"`
Main struct {
Temperature float64 `json:"temp"`
Humidity float64 `json:"humidity"`
Humidity int64 `json:"humidity"`
Pressure float64 `json:"pressure"`
}
Points map[string]interface{}