Skip to content

Commit

Permalink
ci: fix goimports-reviser project name (#22)
Browse files Browse the repository at this point in the history
Signed-off-by: Xie Wei <[email protected]>
  • Loading branch information
waynerv authored Oct 11, 2023
1 parent 5411d7e commit d338bc6
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 28 deletions.
3 changes: 2 additions & 1 deletion api/v1/geminicluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ package v1
import (
"fmt"

"github.com/openGemini/openGemini-operator/pkg/utils"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

"github.com/openGemini/openGemini-operator/pkg/utils"
)

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
Expand Down
13 changes: 7 additions & 6 deletions controllers/geminicluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ import (

_ "github.com/influxdata/influxdb1-client"
influxClient "github.com/influxdata/influxdb1-client/v2"
opengeminiv1 "github.com/openGemini/openGemini-operator/api/v1"
"github.com/openGemini/openGemini-operator/pkg/configfile"
"github.com/openGemini/openGemini-operator/pkg/naming"
"github.com/openGemini/openGemini-operator/pkg/resources"
"github.com/openGemini/openGemini-operator/pkg/specs"
"github.com/openGemini/openGemini-operator/pkg/utils"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/equality"
Expand All @@ -39,6 +33,13 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/log"

opengeminiv1 "github.com/openGemini/openGemini-operator/api/v1"
"github.com/openGemini/openGemini-operator/pkg/configfile"
"github.com/openGemini/openGemini-operator/pkg/naming"
"github.com/openGemini/openGemini-operator/pkg/resources"
"github.com/openGemini/openGemini-operator/pkg/specs"
"github.com/openGemini/openGemini-operator/pkg/utils"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion controllers/geminicluster_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ import (
"context"
"testing"

opengeminiv1 "github.com/openGemini/openGemini-operator/api/v1"
"github.com/stretchr/testify/assert"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/controller-runtime/pkg/client"

opengeminiv1 "github.com/openGemini/openGemini-operator/api/v1"
)

type MockK8sClient struct {
Expand Down
7 changes: 4 additions & 3 deletions controllers/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ package controllers
import (
"context"

appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

opengeminiv1 "github.com/openGemini/openGemini-operator/api/v1"
"github.com/openGemini/openGemini-operator/pkg/naming"
"github.com/openGemini/openGemini-operator/pkg/opengemini/meta"
"github.com/openGemini/openGemini-operator/pkg/opengemini/sql"
"github.com/openGemini/openGemini-operator/pkg/opengemini/store"
"github.com/openGemini/openGemini-operator/pkg/utils"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// +kubebuilder:rbac:groups="apps",resources="statefulsets",verbs={get,create,patch}
Expand Down
3 changes: 2 additions & 1 deletion controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ import (

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
opengeminioperatorv1 "github.com/openGemini/openGemini-operator/api/v1"
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/rest"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/envtest"
logf "sigs.k8s.io/controller-runtime/pkg/log"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

opengeminioperatorv1 "github.com/openGemini/openGemini-operator/api/v1"
)

// These tests use Ginkgo (BDD-style Go testing framework). Refer to
Expand Down
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import (
"flag"
"os"

opengeminioperatorv1 "github.com/openGemini/openGemini-operator/api/v1"
"github.com/openGemini/openGemini-operator/controllers"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
Expand All @@ -31,6 +29,9 @@ import (
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

opengeminioperatorv1 "github.com/openGemini/openGemini-operator/api/v1"
"github.com/openGemini/openGemini-operator/controllers"
)

var (
Expand Down
1 change: 1 addition & 0 deletions pkg/configfile/configfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"

"github.com/BurntSushi/toml"

opengeminiv1 "github.com/openGemini/openGemini-operator/api/v1"
"github.com/openGemini/openGemini-operator/pkg/naming"
)
Expand Down
3 changes: 2 additions & 1 deletion pkg/naming/names.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"fmt"
"path"

opengeminiv1 "github.com/openGemini/openGemini-operator/api/v1"
appsv1 "k8s.io/api/apps/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

opengeminiv1 "github.com/openGemini/openGemini-operator/api/v1"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion pkg/naming/selectors.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package naming

import (
opengeminiv1 "github.com/openGemini/openGemini-operator/api/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

opengeminiv1 "github.com/openGemini/openGemini-operator/api/v1"
)

func ClusterInstances(cluster string) *metav1.LabelSelector {
Expand Down
5 changes: 3 additions & 2 deletions pkg/opengemini/meta/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"context"
"fmt"

corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/intstr"

opengeminiv1 "github.com/openGemini/openGemini-operator/api/v1"
"github.com/openGemini/openGemini-operator/pkg/naming"
"github.com/openGemini/openGemini-operator/pkg/specs"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/intstr"
)

func DataVolumeMount() corev1.VolumeMount {
Expand Down
5 changes: 3 additions & 2 deletions pkg/opengemini/sql/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package sql
import (
"context"

corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/intstr"

opengeminiv1 "github.com/openGemini/openGemini-operator/api/v1"
"github.com/openGemini/openGemini-operator/pkg/naming"
"github.com/openGemini/openGemini-operator/pkg/specs"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/intstr"
)

func DataVolumeMount() corev1.VolumeMount {
Expand Down
5 changes: 3 additions & 2 deletions pkg/opengemini/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package store
import (
"context"

corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/intstr"

opengeminiv1 "github.com/openGemini/openGemini-operator/api/v1"
"github.com/openGemini/openGemini-operator/pkg/naming"
"github.com/openGemini/openGemini-operator/pkg/specs"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/util/intstr"
)

func DataVolumeMount() corev1.VolumeMount {
Expand Down
3 changes: 2 additions & 1 deletion pkg/specs/configmap.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package specs

import (
"github.com/openGemini/openGemini-operator/pkg/naming"
corev1 "k8s.io/api/core/v1"

"github.com/openGemini/openGemini-operator/pkg/naming"
)

func ConfigFileConfigmapProjection(configmapName string) *corev1.ConfigMapProjection {
Expand Down
7 changes: 4 additions & 3 deletions pkg/specs/service.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package specs

import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"

opengeminiv1 "github.com/openGemini/openGemini-operator/api/v1"
"github.com/openGemini/openGemini-operator/pkg/naming"
"github.com/openGemini/openGemini-operator/pkg/opengemini"
"github.com/openGemini/openGemini-operator/pkg/utils"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
)

func CreateClusterMaintainService(cluster *opengeminiv1.GeminiCluster) *corev1.Service {
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/style_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

echo "run style check for import pkg order"

for file in $(find . -name '*.go'); do goimports-reviser -project-name none-pjn $file; done
for file in $(find . -name '*.go'); do goimports-reviser -project-name github.com/openGemini/openGemini-operator $file; done

GIT_STATUS=`git status | grep "Changes not staged for commit"`;
if [ "$GIT_STATUS" = "" ]; then
Expand All @@ -15,4 +15,4 @@ else
echo "git diff details: ";
git diff | tee;
exit 1;
fi
fi

0 comments on commit d338bc6

Please sign in to comment.