all repos — telegram-bot-api @ 9653a4aad4bed727a828034c0ed5c371aada90af

Golang bindings for the Telegram Bot API

Handle some ignored errors.
Syfaro syfaro@huefox.com
Fri, 29 Dec 2017 21:55:58 -0600
commit

9653a4aad4bed727a828034c0ed5c371aada90af

parent

c268ddc5b9ba4010cd532007877c301b6d4482c4

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

jump to
M bot.gobot.go

@@ -217,9 +217,9 @@ return User{}, err

} var user User - json.Unmarshal(resp.Result, &user) + err = json.Unmarshal(resp.Result, &user) - return user, nil + return user, err } // IsMessageToMe returns true if message directed to this bot.

@@ -292,9 +292,9 @@ return UserProfilePhotos{}, err

} var profilePhotos UserProfilePhotos - json.Unmarshal(resp.Result, &profilePhotos) + err = json.Unmarshal(resp.Result, &profilePhotos) - return profilePhotos, nil + return profilePhotos, err } // GetFile returns a File which can download a file from Telegram.

@@ -310,9 +310,9 @@ return File{}, err

} var file File - json.Unmarshal(resp.Result, &file) + err = json.Unmarshal(resp.Result, &file) - return file, nil + return file, err } // GetUpdates fetches updates.

@@ -340,9 +340,9 @@ return []Update{}, err

} var updates []Update - json.Unmarshal(resp.Result, &updates) + err = json.Unmarshal(resp.Result, &updates) - return updates, nil + return updates, err } // GetWebhookInfo allows you to fetch information about a webhook and if