Rename all errors to be prefixed with Err.

pull/41/head
Syfaro 10 years ago
parent 6c84cd1fbb
commit 08d7c01637
  1. 2
      bot.go
  2. 4
      configs.go

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

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