From 2e4fc8c32b87adfab94c5ee610e236fb42e589a9 Mon Sep 17 00:00:00 2001 From: pashakostohrys Date: Mon, 23 Sep 2024 22:40:04 +0300 Subject: [PATCH] make lint issues --- acr_controller/controller/broadcaster.go | 7 +++---- acr_controller/controller/controller.go | 4 ++++ acr_controller/service/acr_service.go | 9 +++++---- acr_controller/service/acr_service_test.go | 6 +++++- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/acr_controller/controller/broadcaster.go b/acr_controller/controller/broadcaster.go index f91ff7fec082b..0aec1be12128a 100644 --- a/acr_controller/controller/broadcaster.go +++ b/acr_controller/controller/broadcaster.go @@ -1,12 +1,11 @@ package application_change_revision_controller import ( - "sync" - - "sync" - log "github.com/sirupsen/logrus" "k8s.io/apimachinery/pkg/watch" + "sync" + + appv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" ) type subscriber struct { diff --git a/acr_controller/controller/controller.go b/acr_controller/controller/controller.go index 06746b350fff9..b0c1944d6608f 100644 --- a/acr_controller/controller/controller.go +++ b/acr_controller/controller/controller.go @@ -4,6 +4,10 @@ import ( "context" "time" + log "github.com/sirupsen/logrus" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" + appclient "github.com/argoproj/argo-cd/v2/acr_controller/application" "github.com/argoproj/argo-cd/v2/acr_controller/service" appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned" diff --git a/acr_controller/service/acr_service.go b/acr_controller/service/acr_service.go index 45ac771ded9ad..4a41ab5eefe41 100644 --- a/acr_controller/service/acr_service.go +++ b/acr_controller/service/acr_service.go @@ -3,14 +3,15 @@ package service import ( "context" "encoding/json" - "sync" - - "sync" - + argoclient "github.com/argoproj/argo-cd/v2/acr_controller/application" + appclient "github.com/argoproj/argo-cd/v2/pkg/apiclient/application" + application "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" + appclientset "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned" log "github.com/sirupsen/logrus" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/utils/pointer" + "sync" ) type ACRService interface { diff --git a/acr_controller/service/acr_service_test.go b/acr_controller/service/acr_service_test.go index 12e19b5994b1f..310fb2b88800e 100644 --- a/acr_controller/service/acr_service_test.go +++ b/acr_controller/service/acr_service_test.go @@ -4,7 +4,11 @@ import ( "context" "testing" - "testing" + "github.com/argoproj/argo-cd/v2/acr_controller/application/mocks" + appclient "github.com/argoproj/argo-cd/v2/pkg/apiclient/application" + appsv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" + apps "github.com/argoproj/argo-cd/v2/pkg/client/clientset/versioned/fake" + "github.com/argoproj/argo-cd/v2/test" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock"