mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 20:21:20 +00:00
Clean up error logs.
Use %v for errors, tidy some messages, make error messages start lowe-case (as per go guidelines). Just accumulated nits.
This commit is contained in:
@@ -241,7 +241,7 @@ func (r *Request) Body(obj interface{}) *Request {
|
||||
}
|
||||
r.body = bytes.NewBuffer(data)
|
||||
default:
|
||||
r.err = fmt.Errorf("Unknown type used for body: %#v", obj)
|
||||
r.err = fmt.Errorf("unknown type used for body: %#v", obj)
|
||||
}
|
||||
return r
|
||||
}
|
||||
@@ -305,7 +305,7 @@ func (r *Request) Watch() (watch.Interface, error) {
|
||||
if resp.Body != nil {
|
||||
body, _ = ioutil.ReadAll(resp.Body)
|
||||
}
|
||||
return nil, fmt.Errorf("For request '%v', got status: %v\nbody: %v", req.URL, resp.StatusCode, string(body))
|
||||
return nil, fmt.Errorf("for request '%v', got status: %v\nbody: %v", req.URL, resp.StatusCode, string(body))
|
||||
}
|
||||
return watch.NewStreamWatcher(watchjson.NewDecoder(resp.Body, r.codec)), nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user