Handle some ignored errors.
Syfaro syfaro@huefox.com
Fri, 29 Dec 2017 21:55:58 -0600
1 files changed,
8 insertions(+),
8 deletions(-)
jump to
M
bot.go
→
bot.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