linting
This commit is contained in:
@@ -186,7 +186,11 @@ func (c *client) sendMessage(ctx context.Context, payload sendMessagePayload) (*
|
||||
c.logger.Warn("Telegram request failed", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func() {
|
||||
if closeErr := resp.Body.Close(); closeErr != nil {
|
||||
c.logger.Warn("Failed to close telegram response body", zap.Error(closeErr))
|
||||
}
|
||||
}()
|
||||
|
||||
respBody, _ := io.ReadAll(io.LimitReader(resp.Body, 16<<10))
|
||||
if resp.StatusCode >= http.StatusOK && resp.StatusCode < http.StatusMultipleChoices {
|
||||
@@ -321,7 +325,11 @@ func (c *client) sendReaction(ctx context.Context, payload setMessageReactionPay
|
||||
c.logger.Warn("Telegram reaction request failed", zap.Error(err))
|
||||
return err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
defer func() {
|
||||
if closeErr := resp.Body.Close(); closeErr != nil {
|
||||
c.logger.Warn("Failed to close telegram reaction response body", zap.Error(closeErr))
|
||||
}
|
||||
}()
|
||||
|
||||
respBody, _ := io.ReadAll(io.LimitReader(resp.Body, 16<<10))
|
||||
if resp.StatusCode >= http.StatusOK && resp.StatusCode < http.StatusMultipleChoices {
|
||||
|
||||
Reference in New Issue
Block a user