From 26c2699648b6b2ba40c2c0b92ecc70d0d8fd52b4 Mon Sep 17 00:00:00 2001 From: Shiming Zhang Date: Wed, 22 May 2024 19:31:41 +0800 Subject: [PATCH] Fix format Signed-off-by: Shiming Zhang --- Makefile | 1 + .../v1alpha1/zz_generated.deepcopy.go | 1 + pkg/old/apis/batch/v2alpha1/types.go | 2 +- pkg/old/apis/batch/v2alpha1/zz_generated.deepcopy.go | 1 + .../apis/discovery/v1alpha1/zz_generated.deepcopy.go | 1 + pkg/old/apis/settings/v1alpha1/types.go | 2 +- .../apis/settings/v1alpha1/zz_generated.deepcopy.go | 1 + pkg/old/scheme/scheme.go | 12 ++++++------ 8 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 63314dd..f765a15 100644 --- a/Makefile +++ b/Makefile @@ -80,6 +80,7 @@ pkg/old/scheme/scheme.go: ./hack/gen_old_scheme.sh pkg/old/apis pkg/old/apis: ./hack/clone_old_apis.sh go.mod -rm -rf ./pkg/old/apis/* ./hack/clone_old_apis.sh $(shell cat go.mod | grep 'k8s.io/api v0.' | awk '{print $$2}' | awk -F. '{print $$2}') + ./scripts/fix.sh .PHONY: generate generate: pkg/scheme/scheme.go diff --git a/pkg/old/apis/auditregistration/v1alpha1/zz_generated.deepcopy.go b/pkg/old/apis/auditregistration/v1alpha1/zz_generated.deepcopy.go index 621a19e..6418a27 100644 --- a/pkg/old/apis/auditregistration/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/old/apis/auditregistration/v1alpha1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/pkg/old/apis/batch/v2alpha1/types.go b/pkg/old/apis/batch/v2alpha1/types.go index 465e614..8234719 100644 --- a/pkg/old/apis/batch/v2alpha1/types.go +++ b/pkg/old/apis/batch/v2alpha1/types.go @@ -18,7 +18,7 @@ package v2alpha1 import ( batchv1 "k8s.io/api/batch/v1" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/pkg/old/apis/batch/v2alpha1/zz_generated.deepcopy.go b/pkg/old/apis/batch/v2alpha1/zz_generated.deepcopy.go index 1b03f67..d238773 100644 --- a/pkg/old/apis/batch/v2alpha1/zz_generated.deepcopy.go +++ b/pkg/old/apis/batch/v2alpha1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/pkg/old/apis/discovery/v1alpha1/zz_generated.deepcopy.go b/pkg/old/apis/discovery/v1alpha1/zz_generated.deepcopy.go index 13e54d5..1333914 100644 --- a/pkg/old/apis/discovery/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/old/apis/discovery/v1alpha1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/pkg/old/apis/settings/v1alpha1/types.go b/pkg/old/apis/settings/v1alpha1/types.go index 8cc99d4..6642a83 100644 --- a/pkg/old/apis/settings/v1alpha1/types.go +++ b/pkg/old/apis/settings/v1alpha1/types.go @@ -17,7 +17,7 @@ limitations under the License. package v1alpha1 import ( - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/pkg/old/apis/settings/v1alpha1/zz_generated.deepcopy.go b/pkg/old/apis/settings/v1alpha1/zz_generated.deepcopy.go index ed6c31a..c77d6eb 100644 --- a/pkg/old/apis/settings/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/old/apis/settings/v1alpha1/zz_generated.deepcopy.go @@ -1,3 +1,4 @@ +//go:build !ignore_autogenerated // +build !ignore_autogenerated /* diff --git a/pkg/old/scheme/scheme.go b/pkg/old/scheme/scheme.go index 450260b..0e76a46 100644 --- a/pkg/old/scheme/scheme.go +++ b/pkg/old/scheme/scheme.go @@ -18,21 +18,21 @@ package scheme // Don't edit this file directly. It is generated by gen_old_scheme.sh. import ( - settingsv1alpha1 "github.com/etcd-io/auger/pkg/old/apis/settings/v1alpha1" - flowcontrolv1alpha1 "github.com/etcd-io/auger/pkg/old/apis/flowcontrol/v1alpha1" auditregistrationv1alpha1 "github.com/etcd-io/auger/pkg/old/apis/auditregistration/v1alpha1" - discoveryv1alpha1 "github.com/etcd-io/auger/pkg/old/apis/discovery/v1alpha1" batchv2alpha1 "github.com/etcd-io/auger/pkg/old/apis/batch/v2alpha1" + discoveryv1alpha1 "github.com/etcd-io/auger/pkg/old/apis/discovery/v1alpha1" + flowcontrolv1alpha1 "github.com/etcd-io/auger/pkg/old/apis/flowcontrol/v1alpha1" resourcev1alpha1 "github.com/etcd-io/auger/pkg/old/apis/resource/v1alpha1" + settingsv1alpha1 "github.com/etcd-io/auger/pkg/old/apis/settings/v1alpha1" "k8s.io/apimachinery/pkg/runtime" ) // AddToScheme adds all types of this clientset into the given scheme. func AddToScheme(scheme *runtime.Scheme) { - _ = settingsv1alpha1.AddToScheme(scheme) - _ = flowcontrolv1alpha1.AddToScheme(scheme) _ = auditregistrationv1alpha1.AddToScheme(scheme) - _ = discoveryv1alpha1.AddToScheme(scheme) _ = batchv2alpha1.AddToScheme(scheme) + _ = discoveryv1alpha1.AddToScheme(scheme) + _ = flowcontrolv1alpha1.AddToScheme(scheme) _ = resourcev1alpha1.AddToScheme(scheme) + _ = settingsv1alpha1.AddToScheme(scheme) }