fix: remove memory leak
This commit is contained in:
parent
31075ef579
commit
f366938d55
2 changed files with 5 additions and 0 deletions
|
@ -7,6 +7,10 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
|||
|
||||
## Unreleased
|
||||
|
||||
### Fixed
|
||||
|
||||
- remove memory leak
|
||||
|
||||
## v1.0.1 - 2019-08-22
|
||||
|
||||
### Added
|
||||
|
|
|
@ -62,6 +62,7 @@ type WeatherData struct {
|
|||
|
||||
// FetchData from OpenWeatherMap API
|
||||
func (w *Weather) FetchData() {
|
||||
w.WeatherDatas = []WeatherData{}
|
||||
for _, city := range w.Config.Cities {
|
||||
resp, err := http.Get(
|
||||
fmt.Sprintf(
|
||||
|
|
Loading…
Reference in a new issue