From 9a25cbf9c026bf0ac0b0549be7ff265120f47a35 Mon Sep 17 00:00:00 2001 From: srahul3 Date: Fri, 16 Jun 2023 20:18:02 +0530 Subject: [PATCH] fixing linting issue --- control-plane/catalog/to-consul/annotation.go | 2 +- control-plane/catalog/to-consul/resource.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/control-plane/catalog/to-consul/annotation.go b/control-plane/catalog/to-consul/annotation.go index 7b729f87da..edca70b60c 100644 --- a/control-plane/catalog/to-consul/annotation.go +++ b/control-plane/catalog/to-consul/annotation.go @@ -30,6 +30,6 @@ const ( // annotationServiceWeight is the key of the annotation that determines // the traffic weight of the service which is spanned over multiple k8s cluster. // e.g. Service `backend` in k8s cluster `A` receives 25% of the traffic - // compared to same `backend` service in k8s cluster `B` + // compared to same `backend` service in k8s cluster `B`. annotationServiceWeight = "consul.hashicorp.com/service-weight" ) diff --git a/control-plane/catalog/to-consul/resource.go b/control-plane/catalog/to-consul/resource.go index e02da6c71c..08aeec8821 100644 --- a/control-plane/catalog/to-consul/resource.go +++ b/control-plane/catalog/to-consul/resource.go @@ -512,7 +512,7 @@ func (t *ServiceResource) generateRegistrations(key string) { r.Service.ID = serviceID(r.Service.Service, ip) r.Service.Address = ip // Adding information about service weight. - // Overrides the existing weight if present + // Overrides the existing weight if present. if weight, ok := svc.Annotations[annotationServiceWeight]; ok && weight != "" { weightI, err := getServiceWeight(weight) if err == nil { @@ -561,7 +561,7 @@ func (t *ServiceResource) generateRegistrations(key string) { r.Service.Address = addr // Adding information about service weight. - // Overrides the existing weight if present + // Overrides the existing weight if present. if weight, ok := svc.Annotations[annotationServiceWeight]; ok && weight != "" { weightI, err := getServiceWeight(weight) if err == nil { @@ -1028,7 +1028,7 @@ func consulHealthCheckID(k8sNS string, serviceID string) string { // Calculates the passing service weight. func getServiceWeight(weight string) (int, error) { - // error validation if the input param is a number + // error validation if the input param is a number. weightI, err := strconv.Atoi(weight) if err != nil { return -1, err