From 66d198bb52afe6bd54957e5362e816be7eb195d0 Mon Sep 17 00:00:00 2001 From: zzjin Date: Wed, 10 Aug 2022 00:36:23 +0800 Subject: [PATCH] manual fix fmt bug (#1505) manual fix goimports rebase typo Signed-off-by: zzjin --- cmd/image-cri-shim/cmd/root.go | 5 +++-- cmd/lvscare/cmd/care.go | 1 + cmd/sealctl/cmd/ipvs.go | 1 + cmd/sealos/cmd/load.go | 3 ++- cmd/sealos/cmd/run.go | 3 ++- cmd/sealos/cmd/save.go | 3 ++- pkg/apply/processor/interface.go | 7 +++---- pkg/auth/auth.go | 5 +++-- pkg/auth/utils/config.go | 5 +++-- pkg/auth/utils/k8s.go | 5 +++-- pkg/cert/cert.go | 2 +- pkg/checker/host_checker.go | 2 +- pkg/constants/contants.go | 2 +- pkg/image/buildah/cluster/buildah/from.go | 4 ++-- pkg/registry/blobmanifest.go | 4 ++-- pkg/registry/imagemanifest.go | 4 ++-- pkg/registry/interface.go | 2 +- pkg/registry/util.go | 2 +- pkg/runtime/image_shim.go | 2 +- pkg/runtime/kubeadm.go | 2 +- pkg/runtime/registry.go | 10 ++++------ pkg/runtime/runtime_getter.go | 8 ++++---- pkg/runtime/static_files.go | 2 +- pkg/runtime/token.go | 2 +- pkg/utils/confirm/confirm.go | 2 +- pkg/utils/exec/bin_path.go | 2 +- pkg/utils/hash/hash.go | 2 +- pkg/utils/httpserver/go_restful.go | 1 + pkg/utils/images/images.go | 7 ++++--- pkg/utils/iputils/iputils_v2.go | 2 +- pkg/utils/logger/logger.go | 2 +- pkg/utils/versionutil/version.go | 6 +++--- .../labring/image-cri-shim/pkg/server/const.go | 5 +++-- .../labring/image-cri-shim/pkg/server/server.go | 5 +++-- .../labring/image-cri-shim/pkg/server/service.go | 8 ++++---- .../labring/image-cri-shim/pkg/shim/client/client.go | 4 ++-- .../github.com/labring/image-cri-shim/pkg/shim/shim.go | 1 + staging/src/github.com/labring/lvscare/care/route.go | 1 + 38 files changed, 73 insertions(+), 61 deletions(-) diff --git a/cmd/image-cri-shim/cmd/root.go b/cmd/image-cri-shim/cmd/root.go index 992640a19..e6bbf41de 100644 --- a/cmd/image-cri-shim/cmd/root.go +++ b/cmd/image-cri-shim/cmd/root.go @@ -28,11 +28,12 @@ import ( "github.com/labring/image-cri-shim/pkg/cri" "github.com/labring/image-cri-shim/pkg/server" "github.com/labring/image-cri-shim/pkg/shim" - "github.com/labring/sealos/pkg/utils/logger" - "github.com/labring/sealos/pkg/utils/yaml" "github.com/pkg/errors" "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + + "github.com/labring/sealos/pkg/utils/logger" + "github.com/labring/sealos/pkg/utils/yaml" ) var shimSocket, criSocket string diff --git a/cmd/lvscare/cmd/care.go b/cmd/lvscare/cmd/care.go index 8e52b7473..c372360e2 100644 --- a/cmd/lvscare/cmd/care.go +++ b/cmd/lvscare/cmd/care.go @@ -18,6 +18,7 @@ import ( "github.com/spf13/cobra" "github.com/labring/lvscare/care" + "github.com/labring/sealos/pkg/utils/flags" "github.com/labring/sealos/pkg/utils/logger" ) diff --git a/cmd/sealctl/cmd/ipvs.go b/cmd/sealctl/cmd/ipvs.go index 9cd883ce1..be1b28a60 100644 --- a/cmd/sealctl/cmd/ipvs.go +++ b/cmd/sealctl/cmd/ipvs.go @@ -18,6 +18,7 @@ import ( "github.com/spf13/cobra" "github.com/labring/lvscare/care" + "github.com/labring/sealos/pkg/utils/flags" ) diff --git a/cmd/sealos/cmd/load.go b/cmd/sealos/cmd/load.go index f6d1866c1..3408372da 100644 --- a/cmd/sealos/cmd/load.go +++ b/cmd/sealos/cmd/load.go @@ -17,9 +17,10 @@ package cmd import ( "fmt" + "github.com/spf13/cobra" + "github.com/labring/sealos/pkg/image/types" "github.com/labring/sealos/pkg/utils/strings" - "github.com/spf13/cobra" "github.com/labring/sealos/pkg/image" ) diff --git a/cmd/sealos/cmd/run.go b/cmd/sealos/cmd/run.go index f9661a89f..ca2ea9a5b 100644 --- a/cmd/sealos/cmd/run.go +++ b/cmd/sealos/cmd/run.go @@ -15,9 +15,10 @@ package cmd import ( + "github.com/spf13/cobra" + "github.com/labring/sealos/pkg/utils/iputils" "github.com/labring/sealos/pkg/utils/logger" - "github.com/spf13/cobra" "github.com/labring/sealos/pkg/apply" "github.com/labring/sealos/pkg/apply/processor" diff --git a/cmd/sealos/cmd/save.go b/cmd/sealos/cmd/save.go index bae54455a..b94f04c75 100644 --- a/cmd/sealos/cmd/save.go +++ b/cmd/sealos/cmd/save.go @@ -17,9 +17,10 @@ package cmd import ( "fmt" + "github.com/spf13/cobra" + "github.com/labring/sealos/pkg/image/types" "github.com/labring/sealos/pkg/utils/strings" - "github.com/spf13/cobra" "github.com/labring/sealos/pkg/image" ) diff --git a/pkg/apply/processor/interface.go b/pkg/apply/processor/interface.go index 12d599024..6f97763b1 100644 --- a/pkg/apply/processor/interface.go +++ b/pkg/apply/processor/interface.go @@ -17,17 +17,16 @@ package processor import ( "path" - "github.com/labring/sealos/pkg/utils/file" "github.com/pkg/errors" "github.com/labring/sealos/pkg/constants" + "github.com/labring/sealos/pkg/image/types" + v2 "github.com/labring/sealos/pkg/types/v1beta1" "github.com/labring/sealos/pkg/utils/confirm" + "github.com/labring/sealos/pkg/utils/file" "github.com/labring/sealos/pkg/utils/logger" "github.com/labring/sealos/pkg/utils/maps" "github.com/labring/sealos/pkg/utils/strings" - - "github.com/labring/sealos/pkg/image/types" - v2 "github.com/labring/sealos/pkg/types/v1beta1" ) type Interface interface { diff --git a/pkg/auth/auth.go b/pkg/auth/auth.go index 10d2b691a..ad28f30a9 100644 --- a/pkg/auth/auth.go +++ b/pkg/auth/auth.go @@ -15,11 +15,12 @@ package auth import ( + "github.com/pkg/errors" + "golang.org/x/oauth2" + "github.com/labring/sealos/pkg/auth/conf" "github.com/labring/sealos/pkg/auth/sso" "github.com/labring/sealos/pkg/auth/utils" - "github.com/pkg/errors" - "golang.org/x/oauth2" ) var ( diff --git a/pkg/auth/utils/config.go b/pkg/auth/utils/config.go index ef893cdd1..d4f5b68d4 100644 --- a/pkg/auth/utils/config.go +++ b/pkg/auth/utils/config.go @@ -26,12 +26,13 @@ import ( "math/big" "time" - "github.com/labring/sealos/pkg/auth/conf" - "github.com/labring/sealos/pkg/client-go/kubernetes" v1 "k8s.io/api/core/v1" metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/clientcmd" "k8s.io/client-go/tools/clientcmd/api" + + "github.com/labring/sealos/pkg/auth/conf" + "github.com/labring/sealos/pkg/client-go/kubernetes" ) func RandomHexStr(n int) (string, error) { diff --git a/pkg/auth/utils/k8s.go b/pkg/auth/utils/k8s.go index 06897e3f0..fdd2b71e9 100644 --- a/pkg/auth/utils/k8s.go +++ b/pkg/auth/utils/k8s.go @@ -18,14 +18,15 @@ import ( "context" "fmt" - "github.com/labring/sealos/pkg/auth/conf" - "github.com/labring/sealos/pkg/client-go/kubernetes" coreV1 "k8s.io/api/core/v1" rbacV1 "k8s.io/api/rbac/v1" metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1" applyCoreV1 "k8s.io/client-go/applyconfigurations/core/v1" applyMetaV1 "k8s.io/client-go/applyconfigurations/meta/v1" applyRbacV1 "k8s.io/client-go/applyconfigurations/rbac/v1" + + "github.com/labring/sealos/pkg/auth/conf" + "github.com/labring/sealos/pkg/client-go/kubernetes" ) func ApplyServiceAccount(client kubernetes.Client, username string) (*coreV1.ServiceAccount, error) { diff --git a/pkg/cert/cert.go b/pkg/cert/cert.go index b671db399..0cc3bb01c 100644 --- a/pkg/cert/cert.go +++ b/pkg/cert/cert.go @@ -157,7 +157,7 @@ func TryLoadKeyFromDisk(pkiPath string) (crypto.Signer, error) { return key, nil } -// NewCaCertAndKeyFromRoot cmd/kubeadm/app/util/pkiutil/pki_helpers.go NewCertAndKey +// NewCaCertAndKeyFromRoot cmd/kubeadm/app/util/pkiutil/pki_helpers.go NewCertAndKey func NewCaCertAndKeyFromRoot(cfg Config, caCert *x509.Certificate, caKey crypto.Signer) (*x509.Certificate, crypto.Signer, error) { key, err := NewPrivateKey(x509.UnknownPublicKeyAlgorithm) if err != nil { diff --git a/pkg/checker/host_checker.go b/pkg/checker/host_checker.go index 8b0dcb8c2..5bfaf895b 100644 --- a/pkg/checker/host_checker.go +++ b/pkg/checker/host_checker.go @@ -71,7 +71,7 @@ func checkHostnameUnique(s ssh.Interface, ipList []string) error { return nil } -//Check whether the node time is synchronized +// Check whether the node time is synchronized func checkTimeSync(s ssh.Interface, ipList []string) error { logger.Info("checker:timeSync %v", ipList) for _, ip := range ipList { diff --git a/pkg/constants/contants.go b/pkg/constants/contants.go index 69832e7c1..33c0c477e 100644 --- a/pkg/constants/contants.go +++ b/pkg/constants/contants.go @@ -33,7 +33,7 @@ const ( DefaultHostsPath = "/etc/hosts" ) -//CRD kind +// CRD kind const ( Config = "Config" Cluster = "Cluster" diff --git a/pkg/image/buildah/cluster/buildah/from.go b/pkg/image/buildah/cluster/buildah/from.go index dddae8be8..d26b69853 100644 --- a/pkg/image/buildah/cluster/buildah/from.go +++ b/pkg/image/buildah/cluster/buildah/from.go @@ -25,9 +25,9 @@ import ( "github.com/containers/buildah/pkg/parse" "github.com/containers/common/pkg/auth" "github.com/containers/common/pkg/config" - "github.com/labring/sealos/pkg/utils/logger" - "github.com/pkg/errors" + + "github.com/labring/sealos/pkg/utils/logger" ) type fromReply struct { diff --git a/pkg/registry/blobmanifest.go b/pkg/registry/blobmanifest.go index 5a9e04cb6..16711e3c7 100644 --- a/pkg/registry/blobmanifest.go +++ b/pkg/registry/blobmanifest.go @@ -22,8 +22,8 @@ import ( "github.com/opencontainers/go-digest" ) -//this package unmarshal blobs from json into a BlobList struct -//then return a slice of blob digest +// this package unmarshal blobs from json into a BlobList struct +// then return a slice of blob digest type BlobList struct { Layers []distribution.Descriptor `json:"layers"` Config distribution.Descriptor `json:"config"` diff --git a/pkg/registry/imagemanifest.go b/pkg/registry/imagemanifest.go index 5b56e8053..3447d4577 100644 --- a/pkg/registry/imagemanifest.go +++ b/pkg/registry/imagemanifest.go @@ -22,8 +22,8 @@ import ( v1 "github.com/opencontainers/image-spec/specs-go/v1" ) -//this package unmarshal manifests from json into a ManifestList struct -//then choose corresponding manifest by platform +// this package unmarshal manifests from json into a ManifestList struct +// then choose corresponding manifest by platform type ManifestList struct { List []Manifest `json:"manifests"` MediaType string `json:"mediaType"` diff --git a/pkg/registry/interface.go b/pkg/registry/interface.go index 4e62aab23..5863558fb 100644 --- a/pkg/registry/interface.go +++ b/pkg/registry/interface.go @@ -23,7 +23,7 @@ import ( v1 "github.com/opencontainers/image-spec/specs-go/v1" ) -//SaveImage can save a list of images of the specified platform +// SaveImage can save a list of images of the specified platform type Save interface { // SaveImages is not concurrently safe SaveImages(images []string, dir string, platform v1.Platform) ([]string, error) diff --git a/pkg/registry/util.go b/pkg/registry/util.go index 918bbae66..9bec2e2df 100644 --- a/pkg/registry/util.go +++ b/pkg/registry/util.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/util/json" ) -//this package contains some utils to handle docker image name +// this package contains some utils to handle docker image name const ( legacyDefaultDomain = "index.docker.io" defaultDomain = "docker.io" diff --git a/pkg/runtime/image_shim.go b/pkg/runtime/image_shim.go index ebc945e66..37449215e 100644 --- a/pkg/runtime/image_shim.go +++ b/pkg/runtime/image_shim.go @@ -36,7 +36,7 @@ type ImageShim struct { IP string } -//GetInfo default dir is /var/lib/image-cri-shim +// GetInfo default dir is /var/lib/image-cri-shim func (is *ImageShim) GetInfo(rootfs string) string { const imageCustomConfig = "image-cri-shim.yaml" etcPath := path.Join(rootfs, constants.EtcDirName, imageCustomConfig) diff --git a/pkg/runtime/kubeadm.go b/pkg/runtime/kubeadm.go index fd7e3e90e..90dee7897 100644 --- a/pkg/runtime/kubeadm.go +++ b/pkg/runtime/kubeadm.go @@ -74,7 +74,7 @@ func (k *KubeadmRuntime) setAPIVersion(apiVersion string) { k.JoinConfiguration.APIVersion = apiVersion } -//GetterKubeadmAPIVersion is covert version to kubeadmAPIServerVersion +// GetterKubeadmAPIVersion is covert version to kubeadmAPIServerVersion // The support matrix will look something like this now and in the future: // v1.10 and earlier: v1alpha1 // v1.11: v1alpha1 read-only, writes only v1alpha2 Config diff --git a/pkg/runtime/registry.go b/pkg/runtime/registry.go index 72b20e062..953ad90f8 100644 --- a/pkg/runtime/registry.go +++ b/pkg/runtime/registry.go @@ -18,18 +18,16 @@ import ( "fmt" "path" - "github.com/labring/sealos/pkg/utils/file" "github.com/pkg/errors" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "github.com/labring/sealos/pkg/constants" + "github.com/labring/sealos/pkg/passwd" + "github.com/labring/sealos/pkg/types/v1beta1" + "github.com/labring/sealos/pkg/utils/file" "github.com/labring/sealos/pkg/utils/iputils" "github.com/labring/sealos/pkg/utils/logger" "github.com/labring/sealos/pkg/utils/yaml" - - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - - "github.com/labring/sealos/pkg/passwd" - "github.com/labring/sealos/pkg/types/v1beta1" ) func (k *KubeadmRuntime) GetRegistryInfo(rootfs, defaultRegistry string) *v1beta1.RegistryConfig { diff --git a/pkg/runtime/runtime_getter.go b/pkg/runtime/runtime_getter.go index fda10621b..e37550e9b 100644 --- a/pkg/runtime/runtime_getter.go +++ b/pkg/runtime/runtime_getter.go @@ -21,15 +21,15 @@ import ( "fmt" "strings" - "github.com/labring/sealos/pkg/constants" - "github.com/labring/sealos/pkg/ssh" - "github.com/labring/sealos/pkg/utils/iputils" - "github.com/labring/sealos/pkg/utils/logger" "golang.org/x/sync/errgroup" + "github.com/labring/sealos/pkg/constants" "github.com/labring/sealos/pkg/env" "github.com/labring/sealos/pkg/remote" + "github.com/labring/sealos/pkg/ssh" "github.com/labring/sealos/pkg/types/v1beta1" + "github.com/labring/sealos/pkg/utils/iputils" + "github.com/labring/sealos/pkg/utils/logger" ) func (k *KubeadmRuntime) getRegistry() *v1beta1.RegistryConfig { diff --git a/pkg/runtime/static_files.go b/pkg/runtime/static_files.go index 78701f1a3..115f501ae 100644 --- a/pkg/runtime/static_files.go +++ b/pkg/runtime/static_files.go @@ -35,7 +35,7 @@ type StaticFile struct { Name string } -//MasterStaticFiles Put static files here, can be moved to all master nodes before kubeadm execution +// MasterStaticFiles Put static files here, can be moved to all master nodes before kubeadm execution var MasterStaticFiles = []*StaticFile{ { DestinationDir: "/etc/kubernetes", diff --git a/pkg/runtime/token.go b/pkg/runtime/token.go index f1a4a7e91..1e96de255 100644 --- a/pkg/runtime/token.go +++ b/pkg/runtime/token.go @@ -174,7 +174,7 @@ const ( CertificateKeySize = 32 ) -//CreateCertificateKey returns a cryptographically secure random key +// CreateCertificateKey returns a cryptographically secure random key func CreateCertificateKey() (string, error) { randBytes, err := CreateRandBytes(CertificateKeySize) if err != nil { diff --git a/pkg/utils/confirm/confirm.go b/pkg/utils/confirm/confirm.go index 67d80af22..1972a5ca7 100644 --- a/pkg/utils/confirm/confirm.go +++ b/pkg/utils/confirm/confirm.go @@ -19,7 +19,7 @@ import ( "regexp" ) -//Confirm is send the prompt and get result +// Confirm is send the prompt and get result func Confirm(prompt, cancel string) (bool, error) { var yesRx = regexp.MustCompile("^(?:y(?:es)?)$") var noRx = regexp.MustCompile("^(?:n(?:o)?)$") diff --git a/pkg/utils/exec/bin_path.go b/pkg/utils/exec/bin_path.go index 639d5d0a0..f02edd211 100644 --- a/pkg/utils/exec/bin_path.go +++ b/pkg/utils/exec/bin_path.go @@ -46,7 +46,7 @@ func ExecutableFileArch(path string) string { return "" } -//FetchSealosAbsPath 获取sealos绝对路径 +// FetchSealosAbsPath 获取sealos绝对路径 func FetchSealosAbsPath() string { ex, _ := os.Executable() exPath, _ := filepath.Abs(ex) diff --git a/pkg/utils/hash/hash.go b/pkg/utils/hash/hash.go index 4b6afbf6e..01bcaa26b 100644 --- a/pkg/utils/hash/hash.go +++ b/pkg/utils/hash/hash.go @@ -33,7 +33,7 @@ func MD5(body []byte) string { return hex.EncodeToString(bytes[:]) } -//FileMD5 count file md5 +// FileMD5 count file md5 func FileMD5(path string) string { file, err := os.Open(filepath.Clean(path)) if err != nil { diff --git a/pkg/utils/httpserver/go_restful.go b/pkg/utils/httpserver/go_restful.go index 3b5706af8..727dd2cd5 100644 --- a/pkg/utils/httpserver/go_restful.go +++ b/pkg/utils/httpserver/go_restful.go @@ -18,6 +18,7 @@ import ( "net/http" restful "github.com/emicklei/go-restful/v3" + "github.com/labring/sealos/pkg/utils/logger" ) diff --git a/pkg/utils/images/images.go b/pkg/utils/images/images.go index ca81f16fc..230fdb1a7 100644 --- a/pkg/utils/images/images.go +++ b/pkg/utils/images/images.go @@ -22,12 +22,13 @@ import ( "strings" "github.com/containers/image/v5/docker/reference" + "github.com/pkg/errors" + "k8s.io/apimachinery/pkg/util/json" + "github.com/labring/sealos/pkg/utils/file" "github.com/labring/sealos/pkg/utils/http" "github.com/labring/sealos/pkg/utils/logger" str "github.com/labring/sealos/pkg/utils/strings" - "github.com/pkg/errors" - "k8s.io/apimachinery/pkg/util/json" ) func LoadImages(imageDir string) ([]string, error) { @@ -56,7 +57,7 @@ func RunBashCmd(cmd string) (string, error) { return string(result), err } -//crictl images -q +// crictl images -q func IsImageID(out, imageID string) bool { imageIDs := strings.Split(out, "\n") for _, v := range imageIDs { diff --git a/pkg/utils/iputils/iputils_v2.go b/pkg/utils/iputils/iputils_v2.go index 3c9f733e1..42b192ad3 100644 --- a/pkg/utils/iputils/iputils_v2.go +++ b/pkg/utils/iputils/iputils_v2.go @@ -25,7 +25,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" ) -//use only one +// use only one func GetHostIP(host string) string { if !strings.ContainsRune(host, ':') { return host diff --git a/pkg/utils/logger/logger.go b/pkg/utils/logger/logger.go index 8a5032d9d..d3993896f 100644 --- a/pkg/utils/logger/logger.go +++ b/pkg/utils/logger/logger.go @@ -45,7 +45,7 @@ func CfgConsoleLogger(debugMode bool, showPath bool) { defaultLogger = zap.New(zc, zos...) } -//TODO: export more file configs +// TODO: export more file configs // CfgConsoleAndFileLogger config for both console and file logs // cfg donot support concurrent calls (as any package should init cfg at startup once) func CfgConsoleAndFileLogger(debugMode bool, logDir, name string, showPath bool) { diff --git a/pkg/utils/versionutil/version.go b/pkg/utils/versionutil/version.go index a32d8e166..9cf2cd4d3 100644 --- a/pkg/utils/versionutil/version.go +++ b/pkg/utils/versionutil/version.go @@ -82,7 +82,7 @@ func For120(version string) bool { return false } -//ToInt v1.15.6 => 115 +// ToInt v1.15.6 => 115 func ToInt(version string) int { // v1.15.6 => 1.15.6 version = strings.Replace(version, "v", "", -1) @@ -96,7 +96,7 @@ func ToInt(version string) int { return 0 } -//ToIntAll v1.19.1 ==> 1191 +// ToIntAll v1.19.1 ==> 1191 func ToIntAll(version string) int { version = strings.Replace(version, "v", "", -1) arr := strings.Split(version, ".") @@ -109,7 +109,7 @@ func ToIntAll(version string) int { return 0 } -//Compare is version compare +// Compare is version compare // if v1 >= v2 return true, else return false func Compare(v1, v2 string) bool { v1 = strings.Replace(v1, "v", "", -1) diff --git a/staging/src/github.com/labring/image-cri-shim/pkg/server/const.go b/staging/src/github.com/labring/image-cri-shim/pkg/server/const.go index 308422f8b..d523c3244 100644 --- a/staging/src/github.com/labring/image-cri-shim/pkg/server/const.go +++ b/staging/src/github.com/labring/image-cri-shim/pkg/server/const.go @@ -18,11 +18,12 @@ import ( "strings" "time" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/util/wait" + img "github.com/labring/sealos/pkg/utils/images" "github.com/labring/sealos/pkg/utils/logger" "github.com/labring/sealos/pkg/utils/yaml" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/util/wait" ) const ( diff --git a/staging/src/github.com/labring/image-cri-shim/pkg/server/server.go b/staging/src/github.com/labring/image-cri-shim/pkg/server/server.go index 677a833f4..057176274 100644 --- a/staging/src/github.com/labring/image-cri-shim/pkg/server/server.go +++ b/staging/src/github.com/labring/image-cri-shim/pkg/server/server.go @@ -23,10 +23,11 @@ import ( "strconv" "time" - "github.com/labring/sealos/pkg/utils/logger" - netutil "github.com/labring/sealos/pkg/utils/net" "google.golang.org/grpc" k8sapi "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + + "github.com/labring/sealos/pkg/utils/logger" + netutil "github.com/labring/sealos/pkg/utils/net" ) type Options struct { diff --git a/staging/src/github.com/labring/image-cri-shim/pkg/server/service.go b/staging/src/github.com/labring/image-cri-shim/pkg/server/service.go index dce6b0728..e729a6671 100644 --- a/staging/src/github.com/labring/image-cri-shim/pkg/server/service.go +++ b/staging/src/github.com/labring/image-cri-shim/pkg/server/service.go @@ -18,11 +18,11 @@ import ( "context" "strings" - img "github.com/labring/sealos/pkg/utils/images" - str "github.com/labring/sealos/pkg/utils/strings" - - "github.com/labring/sealos/pkg/utils/logger" api "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + + img "github.com/labring/sealos/pkg/utils/images" + "github.com/labring/sealos/pkg/utils/logger" + str "github.com/labring/sealos/pkg/utils/strings" ) const ( diff --git a/staging/src/github.com/labring/image-cri-shim/pkg/shim/client/client.go b/staging/src/github.com/labring/image-cri-shim/pkg/shim/client/client.go index 3410566b4..a6074d71f 100644 --- a/staging/src/github.com/labring/image-cri-shim/pkg/shim/client/client.go +++ b/staging/src/github.com/labring/image-cri-shim/pkg/shim/client/client.go @@ -23,12 +23,12 @@ import ( "syscall" "time" - netutil "github.com/labring/sealos/pkg/utils/net" "google.golang.org/grpc" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/credentials/insecure" - api "k8s.io/cri-api/pkg/apis/runtime/v1alpha2" + + netutil "github.com/labring/sealos/pkg/utils/net" ) // DialNotifyFn is a function to call after a successful net.Dial[Timeout](). diff --git a/staging/src/github.com/labring/image-cri-shim/pkg/shim/shim.go b/staging/src/github.com/labring/image-cri-shim/pkg/shim/shim.go index 953de115c..9a2ba4a31 100644 --- a/staging/src/github.com/labring/image-cri-shim/pkg/shim/shim.go +++ b/staging/src/github.com/labring/image-cri-shim/pkg/shim/shim.go @@ -21,6 +21,7 @@ import ( "github.com/labring/image-cri-shim/pkg/server" "github.com/labring/image-cri-shim/pkg/shim/client" + "github.com/labring/sealos/pkg/utils/logger" ) diff --git a/staging/src/github.com/labring/lvscare/care/route.go b/staging/src/github.com/labring/lvscare/care/route.go index 771cbee19..668347273 100644 --- a/staging/src/github.com/labring/lvscare/care/route.go +++ b/staging/src/github.com/labring/lvscare/care/route.go @@ -16,6 +16,7 @@ package care import ( "github.com/labring/lvscare/pkg/route" + "github.com/labring/sealos/pkg/utils/logger" )