From 5e5de566ee3e664ae54f033dc6b56dcf55b58cef Mon Sep 17 00:00:00 2001 From: Syfaro Date: Tue, 28 Jul 2015 12:19:53 -0400 Subject: [PATCH] remove unneeded else block --- methods.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/methods.go b/methods.go index a1f6e2e..8a1ccac 100644 --- a/methods.go +++ b/methods.go @@ -134,9 +134,8 @@ func (bot *BotAPI) MakeRequest(endpoint string, params url.Values) (APIResponse, resp, err := bot.Client.PostForm("https://api.telegram.org/bot"+bot.Token+"/"+endpoint, params) if err != nil { return APIResponse{}, err - } else { - defer resp.Body.Close() } + defer resp.Body.Close() bytes, err := ioutil.ReadAll(resp.Body) if err != nil {