Fixed typos in docs
This commit is contained in:
@@ -12,8 +12,7 @@ type ForecastEntity struct {
|
||||
Wind Wind `json:"wind"`
|
||||
}
|
||||
|
||||
// The Forecast data type, representing the an set
|
||||
// of ForecastEntity
|
||||
// The Forecast data type, representing a set of ForecastEntity
|
||||
type Forecast struct {
|
||||
Forecast []ForecastEntity
|
||||
Forecast []ForecastEntity `json:"forecast"`
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ func InitDB() *StatDB {
|
||||
}
|
||||
|
||||
func (statDB *StatDB) AddStatistic(cityName string, weather Weather) {
|
||||
key := fmt.Sprintf("%s@%s", weather.Date.Date, cityName)
|
||||
key := fmt.Sprintf("%s@%s", weather.Date.Date.Format("2006-01-02"), cityName)
|
||||
|
||||
// Insert weather statistic into the database only if it isn't present
|
||||
if _, isPresent := statDB.db[key]; isPresent {
|
||||
|
||||
Reference in New Issue
Block a user