From a6b4ce46a6e9a0270cbd9eb3a4d1c746886f4f05 Mon Sep 17 00:00:00 2001 From: NemoD503 <1historicus@gmail.com> Date: Sun, 20 Oct 2019 22:47:21 +0300 Subject: [PATCH] return pointer to error --- bot.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.go b/bot.go index a996790..48f6816 100644 --- a/bot.go +++ b/bot.go @@ -92,7 +92,7 @@ func (bot *BotAPI) MakeRequest(endpoint string, params url.Values) (APIResponse, if apiResp.Parameters != nil { parameters = *apiResp.Parameters } - return apiResp, Error{Code: apiResp.ErrorCode, Message: apiResp.Description, ResponseParameters: parameters} + return apiResp, &Error{Code: apiResp.ErrorCode, Message: apiResp.Description, ResponseParameters: parameters} } return apiResp, nil