Skip to content

Commit d354e12

Browse files
committed
chore: lint: pkg: reorder imports
In preparation to the addition of linter-enforced import ordering, fix import orders in the pkg/ subtree Commandline used: ``` gci write --custom-order -s standard -s blank -s default -s 'prefix(k8s.io)' -s 'prefix(sigs.k8s.io)' -s 'prefix(github.com/openshift)' -s 'prefix(github.com/k8stopologyawareschedwg)' -s localmodule -s dot ./pkg/ ``` This ordering is not the best nor the nicest, but it's very close to our existing unwritten standard, and can be checked and enforced by tooling. GCI is: https://github.com/daixiang0/gci Signed-off-by: Francesco Romani <[email protected]>
1 parent 8d422e1 commit d354e12

File tree

20 files changed

+32
-18
lines changed

20 files changed

+32
-18
lines changed

pkg/apply/apply.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"fmt"
2222

2323
"k8s.io/klog/v2"
24+
2425
k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
2526

2627
"github.com/openshift-kni/numaresources-operator/pkg/objectstate"

pkg/apply/apply_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
apierrors "k8s.io/apimachinery/pkg/api/errors"
2929
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3030
"k8s.io/client-go/kubernetes/scheme"
31+
3132
"sigs.k8s.io/controller-runtime/pkg/client"
3233
"sigs.k8s.io/controller-runtime/pkg/client/fake"
3334

pkg/kubeletconfig/kubeletconfig.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222

2323
"k8s.io/apimachinery/pkg/runtime"
2424
serializer "k8s.io/apimachinery/pkg/runtime/serializer/json"
25-
2625
kubeletconfigv1beta1 "k8s.io/kubelet/config/v1beta1"
2726

2827
mcov1 "github.com/openshift/api/machineconfiguration/v1"

pkg/kubeletconfig/kubeletconfig_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ import (
2020
"errors"
2121
"testing"
2222

23-
mcov1 "github.com/openshift/api/machineconfiguration/v1"
2423
kubeletconfigv1beta1 "k8s.io/kubelet/config/v1beta1"
24+
25+
mcov1 "github.com/openshift/api/machineconfiguration/v1"
2526
)
2627

2728
func TestMissingPayloadMCOKubeletConfToKubeletConf(t *testing.T) {

pkg/loglevel/loglevel.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ import (
2222
corev1 "k8s.io/api/core/v1"
2323
"k8s.io/klog/v2"
2424

25+
operatorv1 "github.com/openshift/api/operator/v1"
26+
2527
"github.com/k8stopologyawareschedwg/deployer/pkg/flagcodec"
2628
k8swgobjupdate "github.com/k8stopologyawareschedwg/deployer/pkg/objectupdate"
27-
operatorv1 "github.com/openshift/api/operator/v1"
2829
)
2930

3031
// ToKlog converts LogLevel value into klog verboseness level according to operator/v1.LogLevel documentation

pkg/loglevel/loglevel_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@ package loglevel
1919
import (
2020
"testing"
2121

22+
"github.com/stretchr/testify/assert"
23+
2224
corev1 "k8s.io/api/core/v1"
2325
"k8s.io/klog/v2"
2426

2527
operatorv1 "github.com/openshift/api/operator/v1"
26-
"github.com/stretchr/testify/assert"
2728
)
2829

2930
func TestToKlog(t *testing.T) {

pkg/metrics/manifests/monitor/monitor.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package sched
1818

1919
import (
2020
corev1 "k8s.io/api/core/v1"
21+
2122
"sigs.k8s.io/controller-runtime/pkg/client"
2223

2324
"github.com/openshift-kni/numaresources-operator/pkg/metrics/manifests"

pkg/numaresourcesscheduler/manifests/sched/sched.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
appsv1 "k8s.io/api/apps/v1"
2121
corev1 "k8s.io/api/core/v1"
2222
rbacv1 "k8s.io/api/rbac/v1"
23+
2324
"sigs.k8s.io/controller-runtime/pkg/client"
2425

2526
k8swgmanifests "github.com/k8stopologyawareschedwg/deployer/pkg/manifests"

pkg/numaresourcesscheduler/objectstate/sched/sched.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
corev1 "k8s.io/api/core/v1"
2424
rbacv1 "k8s.io/api/rbac/v1"
2525
"k8s.io/klog/v2"
26+
2627
"sigs.k8s.io/controller-runtime/pkg/client"
2728

2829
"github.com/k8stopologyawareschedwg/deployer/pkg/manifests"

pkg/numaresourcesscheduler/objectstate/sched/sched_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
appsv1 "k8s.io/api/apps/v1"
2424
corev1 "k8s.io/api/core/v1"
2525
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
26+
2627
"sigs.k8s.io/controller-runtime/pkg/client"
2728

2829
nropv1 "github.com/openshift-kni/numaresources-operator/api/v1"

0 commit comments

Comments
 (0)