Skip to content

Commit

Permalink
error strings should not be capitalized (ST1005)
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo82148 committed May 25, 2021
1 parent 8045298 commit e0e680b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions goveralls.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func processParallelFinish(jobID, token string) error {
defer res.Body.Close()
bodyBytes, err := ioutil.ReadAll(res.Body)
if err != nil {
return fmt.Errorf("Unable to read response body from coveralls: %s", err)
return fmt.Errorf("unable to read response body from coveralls: %s", err)
}

if res.StatusCode >= http.StatusInternalServerError && *shallow {
Expand All @@ -274,12 +274,12 @@ func processParallelFinish(jobID, token string) error {
}

if res.StatusCode != 200 {
return fmt.Errorf("Bad response status from coveralls: %d\n%s", res.StatusCode, bodyBytes)
return fmt.Errorf("bad response status from coveralls: %d\n%s", res.StatusCode, bodyBytes)
}

var response WebHookResponse
if err = json.Unmarshal(bodyBytes, &response); err != nil {
return fmt.Errorf("Unable to unmarshal response JSON from coveralls: %s\n%s", err, bodyBytes)
return fmt.Errorf("unable to unmarshal response JSON from coveralls: %s\n%s", err, bodyBytes)
}

if !response.Done {
Expand Down Expand Up @@ -499,7 +499,7 @@ func process() error {
defer res.Body.Close()
bodyBytes, err := ioutil.ReadAll(res.Body)
if err != nil {
return fmt.Errorf("Unable to read response body from coveralls: %s", err)
return fmt.Errorf("unable to read response body from coveralls: %s", err)
}

if res.StatusCode >= http.StatusInternalServerError && *shallow {
Expand All @@ -508,11 +508,11 @@ func process() error {
}

if res.StatusCode != 200 {
return fmt.Errorf("Bad response status from coveralls: %d\n%s", res.StatusCode, bodyBytes)
return fmt.Errorf("bad response status from coveralls: %d\n%s", res.StatusCode, bodyBytes)
}
var response Response
if err = json.Unmarshal(bodyBytes, &response); err != nil {
return fmt.Errorf("Unable to unmarshal response JSON from coveralls: %s\n%s", err, bodyBytes)
return fmt.Errorf("unable to unmarshal response JSON from coveralls: %s\n%s", err, bodyBytes)
}
if response.Error {
return errors.New(response.Message)
Expand Down

0 comments on commit e0e680b

Please sign in to comment.