Rename all errors to be prefixed with Err.

bot-api-6.1
Syfaro 2016-01-03 22:50:29 -06:00
parent 6c84cd1fbb
commit 08d7c01637
2 changed files with 3 additions and 3 deletions

2
bot.go
View File

@ -64,7 +64,7 @@ func (bot *BotAPI) MakeRequest(endpoint string, params url.Values) (APIResponse,
defer resp.Body.Close()
if resp.StatusCode == http.StatusForbidden {
return APIResponse{}, errors.New(APIForbidden)
return APIResponse{}, errors.New(ErrAPIForbidden)
}
bytes, err := ioutil.ReadAll(resp.Body)

View File

@ -30,8 +30,8 @@ const (
// API errors
const (
// APIForbidden happens when a token is bad
APIForbidden = "forbidden"
// ErrAPIForbidden happens when a token is bad
ErrAPIForbidden = "forbidden"
)
// Constant values for ParseMode in MessageConfig