fix debug printing

pull/131/head
zhuharev 8 years ago
parent 3cfc52c9c2
commit 6b5102fab5
No known key found for this signature in database
GPG Key ID: 4B21EFB85BF9CBF5
  1. 5
      bot.go

@ -73,8 +73,9 @@ func (bot *BotAPI) MakeRequest(endpoint string, params url.Values) (APIResponse,
if err != nil { if err != nil {
return apiResp, err return apiResp, err
} }
if bot.Debug { if bot.Debug {
log.Printf("%s %s", endpoint, bytes) log.Printf("%s resp: %s", endpoint, bytes)
} }
if resp.StatusCode == http.StatusForbidden { if resp.StatusCode == http.StatusForbidden {
@ -110,7 +111,7 @@ func (bot *BotAPI) decodeAPIResponse(responseBody io.Reader, resp *APIResponse)
return return
} }
return return data, nil
} }
// makeMessageRequest makes a request to a method that returns a Message. // makeMessageRequest makes a request to a method that returns a Message.