Skip to content

Commit

Permalink
lint: error strings should not be capitalized (ST1005)
Browse files Browse the repository at this point in the history
Signed-off-by: jnelle <[email protected]>
  • Loading branch information
jnelle committed Oct 2, 2022
1 parent 02105a4 commit cc8235a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func doRequest(req *fasthttp.Request) ([]byte, fasthttp.ResponseHeader, error) {

err := client.Do(req, resp)
if err != nil {
return nil, fasthttp.ResponseHeader{}, errors.New("Request failed!")
return nil, fasthttp.ResponseHeader{}, errors.New("request failed")

}
return resp.Body(), resp.Header, nil
Expand Down Expand Up @@ -150,7 +150,7 @@ func (m *MFPClient) login() error {
m.MFPCallbackCode = result[1]
err = m.loginCallBack()
if err != nil {
return errors.New("Sending callbackcode failed!")
return errors.New("sending callbackcode failed")
}
return nil
}
Expand Down Expand Up @@ -228,7 +228,7 @@ func (m *MFPClient) getMFPUserID() error {
// Any food product that you like
func (m *MFPClient) SearchFoodWithoutPagination(foodName string) (*models.FoodSearchResponse, error) {
if len(m.Username) == 0 || len(m.Password) == 0 {
return nil, errors.New("Mode without authentication active")
return nil, errors.New("mode without authentication active")
}

url := utils.BuildFoodSearchURL(foodName, fmt.Sprint(constants.APIBaseURL+"/v2/search/nutrition"))
Expand Down Expand Up @@ -289,7 +289,7 @@ func (m *MFPClient) InitialLoad() error {
// Refreshes the user token
func (m *MFPClient) RefreshToken() error {
if len(m.Username) == 0 || len(m.Password) == 0 {
return errors.New("Mode without authentication active")
return errors.New("mode without authentication active")
}

bodyString := fmt.Sprintf("grant_type=refresh_token&refresh_token=%s&client_id=%s&client_secret=%s&user_id=%s", m.IDTokenResponse.RefreshToken, constants.ClientID, constants.ClientSecret, m.MFPUserID)
Expand Down

0 comments on commit cc8235a

Please sign in to comment.