From 668c4e42dfc016f6e8173e03c1efcf3a1c78614d Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Fri, 17 May 2024 13:50:33 -0400 Subject: [PATCH] style: Uncapitalize error messages As per [1], errors should be uncapitalized, "since they are usually printed following other context". 1: https://go.dev/wiki/CodeReviewComments --- controllers/ovndbcluster_controller.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/ovndbcluster_controller.go b/controllers/ovndbcluster_controller.go index b69d0469..5a3517bc 100644 --- a/controllers/ovndbcluster_controller.go +++ b/controllers/ovndbcluster_controller.go @@ -608,7 +608,7 @@ func (r *OVNDBClusterReconciler) reconcileNormal(ctx context.Context, instance * func getPodIPInNetwork(ovnPod corev1.Pod, namespace string, networkAttachment string) (string, error) { netStat, err := nad.GetNetworkStatusFromAnnotation(ovnPod.Annotations) if err != nil { - err = fmt.Errorf("Error while getting the Network Status for pod %s: %w", ovnPod.Name, err) + err = fmt.Errorf("error while getting the Network Status for pod %s: %w", ovnPod.Name, err) return "", err } for _, v := range netStat { @@ -619,7 +619,7 @@ func getPodIPInNetwork(ovnPod corev1.Pod, namespace string, networkAttachment st } } // If this is reached it means that no IP was found, construct error and return - err = fmt.Errorf("Error while getting IP address from pod %s in network %s, IP is empty", ovnPod.Name, networkAttachment) + err = fmt.Errorf("error while getting IP address from pod %s in network %s, IP is empty", ovnPod.Name, networkAttachment) return "", err } @@ -708,7 +708,7 @@ func (r *OVNDBClusterReconciler) reconcileServices( svcLabels, ) if err != nil { - err = fmt.Errorf("Error while deleting service with name %s: %w", fullServiceName, err) + err = fmt.Errorf("error while deleting service with name %s: %w", fullServiceName, err) return ctrl.Result{}, err } }