remove unneeded else block
Syfaro syfaro@foxpaw.in
Tue, 28 Jul 2015 12:19:53 -0400
1 files changed,
1 insertions(+),
2 deletions(-)
jump to
M
methods.go
→
methods.go
@@ -134,9 +134,8 @@ func (bot *BotAPI) MakeRequest(endpoint string, params url.Values) (APIResponse, error) {
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 {