Skip to content

Commit 9496bb2

Browse files
author
Syfaro
committed
Rename all errors to be prefixed with Err.
1 parent 70aafe4 commit 9496bb2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bot.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ func (bot *BotAPI) MakeRequest(endpoint string, params url.Values) (APIResponse,
6464
defer resp.Body.Close()
6565

6666
if resp.StatusCode == http.StatusForbidden {
67-
return APIResponse{}, errors.New(APIForbidden)
67+
return APIResponse{}, errors.New(ErrAPIForbidden)
6868
}
6969

7070
bytes, err := ioutil.ReadAll(resp.Body)

configs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ const (
3030

3131
// API errors
3232
const (
33-
// APIForbidden happens when a token is bad
34-
APIForbidden = "forbidden"
33+
// ErrAPIForbidden happens when a token is bad
34+
ErrAPIForbidden = "forbidden"
3535
)
3636

3737
// Constant values for ParseMode in MessageConfig

0 commit comments

Comments
 (0)