fix debug printing
zhuharev kirill@zhuharev.ru
Tue, 31 Oct 2017 02:34:34 +0300
1 files changed,
3 insertions(+),
2 deletions(-)
jump to
M
bot.go
→
bot.go
@@ -73,8 +73,9 @@ bytes, err := bot.decodeAPIResponse(resp.Body, &apiResp)
if err != nil { return apiResp, err } + if bot.Debug { - log.Printf("%s %s", endpoint, bytes) + log.Printf("%s resp: %s", endpoint, bytes) } if resp.StatusCode == http.StatusForbidden {@@ -110,7 +111,7 @@ if err != nil {
return } - return + return data, nil } // makeMessageRequest makes a request to a method that returns a Message.