From e0e680bae35dd456222385cf972566b86c1f285c Mon Sep 17 00:00:00 2001 From: Ichinose Shogo Date: Tue, 25 May 2021 09:40:04 +0900 Subject: [PATCH] error strings should not be capitalized (ST1005) --- goveralls.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/goveralls.go b/goveralls.go index a9a6374..126feb7 100644 --- a/goveralls.go +++ b/goveralls.go @@ -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 { @@ -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 { @@ -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 { @@ -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)