mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Don't use defer
in a loop
As the body of request isn't used, we can sloe it immediately.
This commit is contained in:
parent
60e1d9e361
commit
736f8b4dac
2 changed files with 2 additions and 2 deletions
|
@ -82,7 +82,7 @@ func (c *Client) SendDiscordMsg(feed *model.Feed, entries model.Entries) error {
|
|||
if err != nil {
|
||||
return fmt.Errorf("discord: unable to send request: %v", err)
|
||||
}
|
||||
defer response.Body.Close()
|
||||
response.Body.Close()
|
||||
|
||||
if response.StatusCode >= 400 {
|
||||
return fmt.Errorf("discord: unable to send a notification: url=%s status=%d", c.webhookURL, response.StatusCode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue