From 28d30125fed263b58fb291e0a7abe125910bb600 Mon Sep 17 00:00:00 2001 From: Simon Tien Date: Mon, 2 Dec 2024 10:38:03 +1100 Subject: [PATCH] lint: fix gci lint error --- .../webhook/endpoints/v1/endpoints_default.go | 5 +++-- .../webhook/endpoints/v1/endpoints_default_test.go | 9 +++++---- .../webhook/endpoints/v1/endpoints_handler.go | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/pkg/yurtmanager/webhook/endpoints/v1/endpoints_default.go b/pkg/yurtmanager/webhook/endpoints/v1/endpoints_default.go index 917de6a4fe3..cf7160d168b 100644 --- a/pkg/yurtmanager/webhook/endpoints/v1/endpoints_default.go +++ b/pkg/yurtmanager/webhook/endpoints/v1/endpoints_default.go @@ -20,12 +20,13 @@ import ( "context" "fmt" - nodeutil "github.com/openyurtio/openyurt/pkg/yurtmanager/controller/util/node" - podutil "github.com/openyurtio/openyurt/pkg/yurtmanager/controller/util/pod" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/client" + + nodeutil "github.com/openyurtio/openyurt/pkg/yurtmanager/controller/util/node" + podutil "github.com/openyurtio/openyurt/pkg/yurtmanager/controller/util/pod" ) // Default satisfies the defaulting webhook interface. diff --git a/pkg/yurtmanager/webhook/endpoints/v1/endpoints_default_test.go b/pkg/yurtmanager/webhook/endpoints/v1/endpoints_default_test.go index 32eb1744856..926575af795 100644 --- a/pkg/yurtmanager/webhook/endpoints/v1/endpoints_default_test.go +++ b/pkg/yurtmanager/webhook/endpoints/v1/endpoints_default_test.go @@ -20,10 +20,6 @@ import ( "context" "testing" - "github.com/openyurtio/openyurt/pkg/apis" - "github.com/openyurtio/openyurt/pkg/projectinfo" - nodeutils "github.com/openyurtio/openyurt/pkg/yurtmanager/controller/util/node" - v1 "github.com/openyurtio/openyurt/pkg/yurtmanager/webhook/endpoints/v1" "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -31,6 +27,11 @@ import ( clientgoscheme "k8s.io/client-go/kubernetes/scheme" "k8s.io/utils/ptr" fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake" + + "github.com/openyurtio/openyurt/pkg/apis" + "github.com/openyurtio/openyurt/pkg/projectinfo" + nodeutils "github.com/openyurtio/openyurt/pkg/yurtmanager/controller/util/node" + v1 "github.com/openyurtio/openyurt/pkg/yurtmanager/webhook/endpoints/v1" ) func TestDefault_AutonomyAnnotations(t *testing.T) { diff --git a/pkg/yurtmanager/webhook/endpoints/v1/endpoints_handler.go b/pkg/yurtmanager/webhook/endpoints/v1/endpoints_handler.go index ece3249ee3a..1b315681dc6 100644 --- a/pkg/yurtmanager/webhook/endpoints/v1/endpoints_handler.go +++ b/pkg/yurtmanager/webhook/endpoints/v1/endpoints_handler.go @@ -17,13 +17,14 @@ limitations under the License. package v1 import ( - yurtClient "github.com/openyurtio/openyurt/cmd/yurt-manager/app/client" - "github.com/openyurtio/openyurt/cmd/yurt-manager/names" - "github.com/openyurtio/openyurt/pkg/yurtmanager/webhook/util" v1 "k8s.io/api/core/v1" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/webhook" + + yurtClient "github.com/openyurtio/openyurt/cmd/yurt-manager/app/client" + "github.com/openyurtio/openyurt/cmd/yurt-manager/names" + "github.com/openyurtio/openyurt/pkg/yurtmanager/webhook/util" ) const (