From 7e2be6bb4fd88013cbe613471a2492cf10164636 Mon Sep 17 00:00:00 2001 From: MenD32 Date: Wed, 4 Sep 2024 15:14:55 +0300 Subject: [PATCH] fixed lint Signed-off-by: MenD32 --- controllers/eventsource/resource.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/controllers/eventsource/resource.go b/controllers/eventsource/resource.go index 22db038b28..493ff6d21f 100644 --- a/controllers/eventsource/resource.go +++ b/controllers/eventsource/resource.go @@ -399,11 +399,12 @@ func buildService(args *AdaptorArgs) (*corev1.Service, error) { }, } -if args.EventSource.Spec.Service.Metadata.Annotations != nil { - svc.ObjectMeta.SetAnnotations(args.EventSource.Spec.Service.Metadata.Annotations) -} -if args.EventSource.Spec.Service.Metadata.Labels != nil { svc.ObjectMeta.SetLabels(args.EventSource.Spec.Service.Metadata.Labels) -} + if args.EventSource.Spec.Service.Metadata.Annotations != nil { + svc.ObjectMeta.SetAnnotations(args.EventSource.Spec.Service.Metadata.Annotations) + } + if args.EventSource.Spec.Service.Metadata.Labels != nil { + svc.ObjectMeta.SetLabels(args.EventSource.Spec.Service.Metadata.Labels) + } if err := controllerscommon.SetObjectMeta(eventSource, svc, v1alpha1.SchemaGroupVersionKind); err != nil { return nil, err }