🌱 add a verify rule for golang files import order (#177)

* 🌱 add a verify rule for golang files import order

This PR uses the [gci tool](https://github.com/daixiang0/gci) to make all go files' import section with a specific order, it will organize import with group with order:
1. standard library modules
2. 3rd party modules
3. modules in OCM org, like the `open-cluster-management.io/api`
4. current project `open-cluster-management.io/ocm` modules

developers can use the `make fmt-imports` to format the import automatically and the `make verify-fmt-imports` to check for any violation.

Signed-off-by: zhujian <jiazhu@redhat.com>

* 🌱 format the go files import

Signed-off-by: zhujian <jiazhu@redhat.com>

---------

Signed-off-by: zhujian <jiazhu@redhat.com>
This commit is contained in:
Jian Zhu
2023-06-12 22:23:04 +08:00
committed by GitHub
parent 3c9bfea949
commit 7332a585c0
266 changed files with 826 additions and 594 deletions

View File

@@ -3,7 +3,6 @@ package operator
import (
"context"
"fmt"
"open-cluster-management.io/ocm/test/integration/util"
"time"
"github.com/onsi/ginkgo/v2"
@@ -15,9 +14,12 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/util/cert"
operatorapiv1 "open-cluster-management.io/api/operator/v1"
v1 "open-cluster-management.io/api/operator/v1"
"open-cluster-management.io/ocm/pkg/operator/helpers"
"open-cluster-management.io/ocm/test/integration/util"
)
func updateDeploymentStatus(kubeClient kubernetes.Interface, namespace, deploymentName string) {