Commit 1eb4cf41 authored by Michelle Noorali's avatar Michelle Noorali

Merge pull request #492 from michelleN/fix-style

chore(client): fix style errors
parents 6ec1c9e3 dbbb4933
......@@ -226,27 +226,28 @@ func (r *Response) HTTPError() error {
defer r.Body.Close()
body, err := ioutil.ReadAll(r.Body)
if err != nil {
return err
}
if contentType == "application/json" {
httpErr := httputil.Error{}
json.Unmarshal(body, &httpErr)
return &HTTPError{
StatusCode: r.StatusCode,
Message: httpErr.Msg,
URL: r.Request.URL,
}
} else {
if err != nil {
if err := json.Unmarshal(body, &httpErr); err != nil {
return err
}
return &HTTPError{
StatusCode: r.StatusCode,
Message: string(body),
Message: httpErr.Msg,
URL: r.Request.URL,
}
}
return nil
return &HTTPError{
StatusCode: r.StatusCode,
Message: string(body),
URL: r.Request.URL,
}
}
// HTTPError is an error caused by an unexpected HTTP status code.
......
......@@ -100,7 +100,7 @@ func (c *Client) DeleteDeployment(name string) (*common.Deployment, error) {
return deployment, err
}
// DescribDeployment describes the kubernetes resources of the supplied deployment
// DescribeDeployment describes the kubernetes resources of the supplied deployment
func (c *Client) DescribeDeployment(name string) (*common.Deployment, error) {
var deployment *common.Deployment
//TODO: implement
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment