Skip to content

Commit

Permalink
The import package sort adjustment in the go file under the openyurt/…
Browse files Browse the repository at this point in the history
…pkg/yurtctl (#582)
  • Loading branch information
yanyhui authored Nov 12, 2021
1 parent cee6b42 commit 3e3e462
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 29 deletions.
4 changes: 2 additions & 2 deletions pkg/yurtctl/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import (
"fmt"
"os"

"github.com/spf13/cobra"
flag "github.com/spf13/pflag"
"k8s.io/klog"

"github.com/openyurtio/openyurt/pkg/projectinfo"
Expand All @@ -31,8 +33,6 @@ import (
"github.com/openyurtio/openyurt/pkg/yurtctl/cmd/reset"
"github.com/openyurtio/openyurt/pkg/yurtctl/cmd/revert"
"github.com/openyurtio/openyurt/pkg/yurtctl/cmd/yurtinit"
"github.com/spf13/cobra"
flag "github.com/spf13/pflag"
)

// NewYurtctlCommand creates a new yurtctl command
Expand Down
8 changes: 4 additions & 4 deletions pkg/yurtctl/cmd/join/join.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ import (
"io"
"os"

"github.com/lithammer/dedent"
"github.com/pkg/errors"
"github.com/spf13/cobra"
flag "github.com/spf13/pflag"
"k8s.io/apimachinery/pkg/util/sets"
clientset "k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
Expand All @@ -40,11 +44,7 @@ import (
configutil "k8s.io/kubernetes/cmd/kubeadm/app/util/config"
kubeconfigutil "k8s.io/kubernetes/cmd/kubeadm/app/util/kubeconfig"

"github.com/lithammer/dedent"
yurtphase "github.com/openyurtio/openyurt/pkg/yurtctl/cmd/join/phases"
"github.com/pkg/errors"
"github.com/spf13/cobra"
flag "github.com/spf13/pflag"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions pkg/yurtctl/cmd/join/phases/join-cloud-node.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import (
"fmt"
"os"

"github.com/lithammer/dedent"
"github.com/pkg/errors"
v1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -39,9 +41,7 @@ import (
"k8s.io/kubernetes/cmd/kubeadm/app/util/apiclient"
kubeconfigutil "k8s.io/kubernetes/cmd/kubeadm/app/util/kubeconfig"

"github.com/lithammer/dedent"
"github.com/openyurtio/openyurt/pkg/yurtctl/constants"
"github.com/pkg/errors"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions pkg/yurtctl/cmd/reset/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ import (
"io"
"os"

"github.com/lithammer/dedent"
"github.com/spf13/cobra"
flag "github.com/spf13/pflag"
"k8s.io/apimachinery/pkg/util/sets"
clientset "k8s.io/client-go/kubernetes"
"k8s.io/klog"
Expand All @@ -38,10 +41,7 @@ import (
kubeconfigutil "k8s.io/kubernetes/cmd/kubeadm/app/util/kubeconfig"
utilruntime "k8s.io/kubernetes/cmd/kubeadm/app/util/runtime"

"github.com/lithammer/dedent"
yurtphases "github.com/openyurtio/openyurt/pkg/yurtctl/cmd/reset/phases"
"github.com/spf13/cobra"
flag "github.com/spf13/pflag"
)

var (
Expand Down
7 changes: 3 additions & 4 deletions pkg/yurtctl/cmd/revert/cloudnode.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ limitations under the License.
package revert

import (
"github.com/spf13/pflag"

"github.com/openyurtio/openyurt/pkg/yurthub/util"

"strings"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
"k8s.io/klog"

"github.com/openyurtio/openyurt/pkg/yurthub/util"
)

// RevertCloudNodeOptions has the information required by sub command revert cloudnode
Expand Down
7 changes: 3 additions & 4 deletions pkg/yurtctl/cmd/revert/edgenode.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ limitations under the License.
package revert

import (
"github.com/spf13/pflag"

"github.com/openyurtio/openyurt/pkg/yurthub/util"

"strings"

"github.com/spf13/cobra"
"github.com/spf13/pflag"
"k8s.io/klog"

"github.com/openyurtio/openyurt/pkg/yurthub/util"
)

// RevertEdgeNodeOptions has the information required by sub command revert edgenode
Expand Down
8 changes: 4 additions & 4 deletions pkg/yurtctl/cmd/yurtinit/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ import (
"strings"
"text/template"

"github.com/lithammer/dedent"
"github.com/pkg/errors"
"github.com/spf13/cobra"
flag "github.com/spf13/pflag"
"k8s.io/apimachinery/pkg/util/sets"
clientset "k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
Expand All @@ -48,11 +52,7 @@ import (
kubeconfigutil "k8s.io/kubernetes/cmd/kubeadm/app/util/kubeconfig"
"k8s.io/kubernetes/cmd/kubeadm/app/util/pubkeypin"

"github.com/lithammer/dedent"
yurtphase "github.com/openyurtio/openyurt/pkg/yurtctl/cmd/yurtinit/phases"
"github.com/pkg/errors"
"github.com/spf13/cobra"
flag "github.com/spf13/pflag"
)

var (
Expand Down
3 changes: 2 additions & 1 deletion pkg/yurtctl/lock/lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ import (
"strconv"
"time"

"github.com/openyurtio/openyurt/pkg/yurtctl/constants"
v1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/klog"

"github.com/openyurtio/openyurt/pkg/yurtctl/constants"
)

const (
Expand Down
3 changes: 1 addition & 2 deletions pkg/yurtctl/util/edgenode/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ import (
"regexp"
"strings"

"github.com/spf13/pflag"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
"k8s.io/client-go/util/homedir"
"k8s.io/klog"

"github.com/spf13/pflag"
)

// FileExists determines whether the file exists
Expand Down
2 changes: 1 addition & 1 deletion pkg/yurtctl/util/system/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"io/ioutil"
"os/exec"

"github.com/opencontainers/selinux/go-selinux"
"k8s.io/klog"

"github.com/opencontainers/selinux/go-selinux"
"github.com/openyurtio/openyurt/pkg/yurtctl/constants"
"github.com/openyurtio/openyurt/pkg/yurtctl/util/edgenode"
)
Expand Down
3 changes: 1 addition & 2 deletions pkg/yurtctl/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ import (
"strconv"
"time"

"k8s.io/klog"

pb "gopkg.in/cheggaaa/pb.v1"
"k8s.io/klog"
)

// DownloadFile try to download file from URL and save to savePath multiple times.
Expand Down

0 comments on commit 3e3e462

Please sign in to comment.