all repos — telegram-bot-api @ afa296aeacfa590b411319acebbd4c4e8d72bff1

Golang bindings for the Telegram Bot API

Merge pull request #275 from NemoD503/error_pointer

Return pointer to error.
Kirill Zhuharev zhuharev@users.noreply.github.com
Thu, 19 Mar 2020 07:22:28 +0300
commit

afa296aeacfa590b411319acebbd4c4e8d72bff1

parent

e4edb03d74f7ef02e5eec8842ffd38ddbfe4944d

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M bot.gobot.go

@@ -100,7 +100,7 @@ parameters := ResponseParameters{}

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