diff options
author | Michael Muré <michael.mure@consensys.net> | 2018-12-17 13:05:05 +0100 |
---|---|---|
committer | Michael Muré <michael.mure@consensys.net> | 2018-12-17 13:05:05 +0100 |
commit | 47b2aa4cc1c20ae37d846da4ea71e09c0c918192 (patch) | |
tree | 143f7d7f5e823afeb0b9616b39996fc37e63c336 /bridge/launchpad/launchpad_api.go | |
parent | d26b1d08c71247dbc66a44e11a51f6b382ca9868 (diff) | |
download | git-bug-47b2aa4cc1c20ae37d846da4ea71e09c0c918192.tar.gz |
launchpad: minor cleaning
Diffstat (limited to 'bridge/launchpad/launchpad_api.go')
-rw-r--r-- | bridge/launchpad/launchpad_api.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bridge/launchpad/launchpad_api.go b/bridge/launchpad/launchpad_api.go index 09e02bc5..849ef925 100644 --- a/bridge/launchpad/launchpad_api.go +++ b/bridge/launchpad/launchpad_api.go @@ -129,11 +129,12 @@ func (lapi *launchpadAPI) SearchTasks(project string) ([]LPBug, error) { return nil, err } - defer resp.Body.Close() - var result launchpadAnswer - if err := json.NewDecoder(resp.Body).Decode(&result); err != nil { + err = json.NewDecoder(resp.Body).Decode(&result) + _ = resp.Body.Close() + + if err != nil { return nil, err } |