add goimports format action (#3630)

Signed-off-by: Jeff <jeffzhang@yunify.com>
This commit is contained in:
zryfish
2021-03-30 13:44:24 +08:00
committed by GitHub
parent 40e3751e43
commit ac275b6e98
561 changed files with 1713 additions and 863 deletions

View File

@@ -18,16 +18,18 @@ package clusterclient
import (
"fmt"
"net/http"
"net/url"
"sync"
corev1 "k8s.io/api/core/v1"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/klog"
clusterv1alpha1 "kubesphere.io/kubesphere/pkg/apis/cluster/v1alpha1"
clusterinformer "kubesphere.io/kubesphere/pkg/client/informers/externalversions/cluster/v1alpha1"
"net/http"
"net/url"
"sync"
)
var (

View File

@@ -18,9 +18,10 @@ package esutil
import (
"fmt"
"github.com/google/go-cmp/cmp"
"testing"
"time"
"github.com/google/go-cmp/cmp"
)
func TestResolveIndexNames(t *testing.T) {

View File

@@ -17,9 +17,10 @@ limitations under the License.
package hashutil
import (
"code.cloudfoundry.org/bytefmt"
"encoding/hex"
"io"
"code.cloudfoundry.org/bytefmt"
"k8s.io/klog"
"kubesphere.io/kubesphere/pkg/utils/readerutils"

View File

@@ -18,10 +18,11 @@ package idutils
import (
"errors"
"net"
"github.com/golang/example/stringutil"
"github.com/sony/sonyflake"
"github.com/speps/go-hashids"
"net"
"kubesphere.io/kubesphere/pkg/utils/stringutils"
)

View File

@@ -18,8 +18,9 @@ package jsonutil
import (
"encoding/json"
"k8s.io/klog"
"strings"
"k8s.io/klog"
)
type JsonRawMessage []byte

View File

@@ -18,6 +18,7 @@ package k8sutil
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
tenantv1alpha1 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1"
tenantv1alpha2 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha2"
)

View File

@@ -19,11 +19,13 @@
package k8sutil
import (
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
tenantv1alpha1 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1"
"reflect"
"testing"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
tenantv1alpha1 "kubesphere.io/kubesphere/pkg/apis/tenant/v1alpha1"
)
func TestIsControlledBy(t *testing.T) {

View File

@@ -18,13 +18,15 @@
package metrics
import (
"net/http"
"github.com/emicklei/go-restful"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
apimachineryversion "k8s.io/apimachinery/pkg/version"
compbasemetrics "k8s.io/component-base/metrics"
ksVersion "kubesphere.io/kubesphere/pkg/version"
"net/http"
)
var (

View File

@@ -22,6 +22,7 @@ import (
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"github.com/pkg/errors"
certutil "k8s.io/client-go/util/cert"
)

View File

@@ -23,15 +23,17 @@ import (
"errors"
"fmt"
"io/ioutil"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/klog"
"kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
"kubesphere.io/kubesphere/pkg/constants"
"kubesphere.io/kubesphere/pkg/simple/client/openpitrix/helmrepoindex"
"os"
"path"
"strings"
"sync"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/klog"
"kubesphere.io/kubesphere/pkg/apis/application/v1alpha1"
"kubesphere.io/kubesphere/pkg/constants"
"kubesphere.io/kubesphere/pkg/simple/client/openpitrix/helmrepoindex"
)
var WorkDir string

View File

@@ -19,11 +19,12 @@ package resourceparse
import (
"io"
"time"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/resource"
"k8s.io/klog"
cmdutil "k8s.io/kubectl/pkg/cmd/util"
"time"
)
func Parse(reader io.Reader, namespace, rlsName string, local bool) ([]*resource.Info, error) {

View File

@@ -18,8 +18,9 @@ package term
import (
"fmt"
"github.com/docker/docker/pkg/term"
"io"
"github.com/docker/docker/pkg/term"
)
// TerminalSize returns the current width and height of the user's terminal. If it isn't a terminal,