Remove duplicated deferred call

Remove duplicated deferred call made by accident to close the response body.
This commit is contained in:
darknesto 2014-09-26 16:02:46 -04:00
parent 4e9f9dc017
commit 8319f2e335

View file

@ -129,7 +129,7 @@ func GetMovieByTitle(title string, year string) (*MovieResult, error) {
r := new(MovieResult)
err = json.NewDecoder(resp.Body).Decode(r)
defer resp.Body.Close()
if err != nil {
return nil, err
}
@ -149,7 +149,7 @@ func GetMovieByImdbId(id string) (*MovieResult, error) {
r := new(MovieResult)
err = json.NewDecoder(resp.Body).Decode(r)
defer resp.Body.Close()
if err != nil {
return nil, err
}