Skip to content

Commit

Permalink
Merge pull request #3 from Juanvulcano/patch-2
Browse files Browse the repository at this point in the history
Fixed error check
  • Loading branch information
Nelson J Morais committed Jun 21, 2016
2 parents 0c4ec42 + f4ee61d commit 967cd41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gosoundcloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ type Resourcer interface {
//processAndUnmarshalResponses to process GET PUT POST request's responses. if the response have statusCode != 200
//then the response body will be unmarshalled into an error string and returned.
func processAndUnmarshalResponses(resp *http.Response, err error, holder interface{}) error {
defer resp.Body.Close()
if err != nil {
return err
}
defer resp.Body.Close()

if resp.StatusCode != 200 {
bytes, _ := ioutil.ReadAll(resp.Body)
Expand Down

0 comments on commit 967cd41

Please sign in to comment.