Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Commit

Permalink
Don't capitalise error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwilkie committed Nov 18, 2016
1 parent 19d3b6e commit 54ec2d9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cmd/wcloud/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (c Client) Deploy(deployment Deployment) error {
return err
}
if res.StatusCode != 204 {
return fmt.Errorf("Error making request: %s", res.Status)
return fmt.Errorf("error making request: %s", res.Status)
}
return nil
}
Expand All @@ -63,7 +63,7 @@ func (c Client) GetDeployments(from, through int64) ([]Deployment, error) {
return nil, err
}
if res.StatusCode != 200 {
return nil, fmt.Errorf("Error making request: %s", res.Status)
return nil, fmt.Errorf("error making request: %s", res.Status)
}
var response struct {
Deployments []Deployment `json:"deployments"`
Expand All @@ -85,7 +85,7 @@ func (c Client) GetEvents(from, through int64) ([]byte, error) {
return nil, err
}
if res.StatusCode != 200 {
return nil, fmt.Errorf("Error making request: %s", res.Status)
return nil, fmt.Errorf("error making request: %s", res.Status)
}
return ioutil.ReadAll(res.Body)
}
Expand All @@ -101,10 +101,10 @@ func (c Client) GetConfig() (*Config, error) {
return nil, err
}
if res.StatusCode == 404 {
return nil, fmt.Errorf("No configuration uploaded yet.")
return nil, fmt.Errorf("no configuration uploaded yet")
}
if res.StatusCode != 200 {
return nil, fmt.Errorf("Error making request: %s", res.Status)
return nil, fmt.Errorf("error making request: %s", res.Status)
}
var config Config
if err := json.NewDecoder(res.Body).Decode(&config); err != nil {
Expand All @@ -128,7 +128,7 @@ func (c Client) SetConfig(config *Config) error {
return err
}
if res.StatusCode != 204 {
return fmt.Errorf("Error making request: %s", res.Status)
return fmt.Errorf("error making request: %s", res.Status)
}
return nil
}
Expand All @@ -144,7 +144,7 @@ func (c Client) GetLogs(deployID string) ([]byte, error) {
return nil, err
}
if res.StatusCode != 200 {
return nil, fmt.Errorf("Error making request: %s", res.Status)
return nil, fmt.Errorf("error making request: %s", res.Status)
}
return ioutil.ReadAll(res.Body)
}

0 comments on commit 54ec2d9

Please sign in to comment.