Skip to content

Commit

Permalink
Closes response body to fix go lint
Browse files Browse the repository at this point in the history
  • Loading branch information
waybackarchiver committed Feb 2, 2022
1 parent 7fcea3a commit 03f5343
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion publish/twitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ func (t *twitterBot) ToTwitter(ctx context.Context, bundle *reduxer.Bundle, text
logger.Error("create tweet failed: %v", err)
return false
}
logger.Debug("created tweet: %v, resp: %v, err: %v", tweet, resp, err)
defer resp.Body.Close()
logger.Debug("created tweet: %v", tweet)

return true
}

0 comments on commit 03f5343

Please sign in to comment.