Skip to content

Commit 1371490

Browse files
committed
Lowercase first letter of chainable errors in PVC protection controller
Lowercase first letter of error messages that are not printed right away to ease chaining with other error messages in PVC protection controller.
1 parent 791d1c8 commit 1371490

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pkg/controller/volume/pvcprotection/pvc_protection_controller.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (c *Controller) processNextWorkItem() bool {
127127

128128
pvcNamespace, pvcName, err := cache.SplitMetaNamespaceKey(pvcKey.(string))
129129
if err != nil {
130-
utilruntime.HandleError(fmt.Errorf("Error parsing PVC key %q: %v", pvcKey, err))
130+
utilruntime.HandleError(fmt.Errorf("error parsing PVC key %q: %v", pvcKey, err))
131131
return true
132132
}
133133

@@ -233,7 +233,7 @@ func (c *Controller) askInformer(pvc *v1.PersistentVolumeClaim) (bool, error) {
233233

234234
pods, err := c.podLister.Pods(pvc.Namespace).List(labels.Everything())
235235
if err != nil {
236-
return false, fmt.Errorf("Cache-based list of pods failed while processing %s/%s: %s", pvc.Namespace, pvc.Name, err.Error())
236+
return false, fmt.Errorf("cache-based list of pods failed while processing %s/%s: %s", pvc.Namespace, pvc.Name, err.Error())
237237
}
238238

239239
for _, pod := range pods {
@@ -251,7 +251,7 @@ func (c *Controller) askAPIServer(pvc *v1.PersistentVolumeClaim) (bool, error) {
251251

252252
podsList, err := c.client.CoreV1().Pods(pvc.Namespace).List(metav1.ListOptions{})
253253
if err != nil {
254-
return false, fmt.Errorf("Live list of pods failed: %s", err.Error())
254+
return false, fmt.Errorf("live list of pods failed: %s", err.Error())
255255
}
256256

257257
for _, pod := range podsList.Items {
@@ -288,7 +288,7 @@ func (c *Controller) pvcAddedUpdated(obj interface{}) {
288288
}
289289
key, err := cache.MetaNamespaceKeyFunc(pvc)
290290
if err != nil {
291-
utilruntime.HandleError(fmt.Errorf("Couldn't get key for Persistent Volume Claim %#v: %v", pvc, err))
291+
utilruntime.HandleError(fmt.Errorf("couldn't get key for Persistent Volume Claim %#v: %v", pvc, err))
292292
return
293293
}
294294
klog.V(4).Infof("Got event on PVC %s", key)
@@ -322,12 +322,12 @@ func (*Controller) parsePod(obj interface{}) *v1.Pod {
322322
if !ok {
323323
tombstone, ok := obj.(cache.DeletedFinalStateUnknown)
324324
if !ok {
325-
utilruntime.HandleError(fmt.Errorf("Couldn't get object from tombstone %#v", obj))
325+
utilruntime.HandleError(fmt.Errorf("couldn't get object from tombstone %#v", obj))
326326
return nil
327327
}
328328
pod, ok = tombstone.Obj.(*v1.Pod)
329329
if !ok {
330-
utilruntime.HandleError(fmt.Errorf("Tombstone contained object that is not a Pod %#v", obj))
330+
utilruntime.HandleError(fmt.Errorf("tombstone contained object that is not a Pod %#v", obj))
331331
return nil
332332
}
333333
}

0 commit comments

Comments
 (0)