Skip to content

Commit

Permalink
Merge pull request #4 from jippi/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
0x46616c6b authored Dec 9, 2022
2 parents 9d52084 + 2889ff3 commit 6ffcf60
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ func fetchInstance() (Instance, error) {
if err != nil {
return instance, err
}
defer res.Body.Close()

err = json.NewDecoder(res.Body).Decode(&instance)
return instance, err
Expand All @@ -104,7 +105,8 @@ func fetchActivity() (Activities, error) {
if err != nil {
return activities, err
}

defer res.Body.Close()

err = json.NewDecoder(res.Body).Decode(&activities)
return activities, err
}

0 comments on commit 6ffcf60

Please sign in to comment.