remove unneeded else block

bot-api-6.1
Syfaro 2015-07-28 12:19:53 -04:00
parent b0c8029a0f
commit 5e5de566ee
1 changed files with 1 additions and 2 deletions

View File

@ -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) resp, err := bot.Client.PostForm("https://api.telegram.org/bot"+bot.Token+"/"+endpoint, params)
if err != nil { if err != nil {
return APIResponse{}, err return APIResponse{}, err
} else {
defer resp.Body.Close()
} }
defer resp.Body.Close()
bytes, err := ioutil.ReadAll(resp.Body) bytes, err := ioutil.ReadAll(resp.Body)
if err != nil { if err != nil {