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/yurthub-third (openyurtio#605)
  • Loading branch information
yanyhui authored Nov 18, 2021
1 parent 17c05cd commit ccabd6f
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 42 deletions.
3 changes: 1 addition & 2 deletions pkg/yurthub/network/dummyif_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ import (
"net"
"strings"

"k8s.io/klog"

"github.com/vishvananda/netlink"
"k8s.io/klog"
)

type DummyInterfaceController interface {
Expand Down
4 changes: 2 additions & 2 deletions pkg/yurthub/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"net"
"time"

"github.com/openyurtio/openyurt/cmd/yurthub/app/config"

"k8s.io/klog"

"github.com/openyurtio/openyurt/cmd/yurthub/app/config"
)

const (
Expand Down
10 changes: 5 additions & 5 deletions pkg/yurthub/proxy/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ import (
"strconv"
"time"

manager "github.com/openyurtio/openyurt/pkg/yurthub/cachemanager"
hubmeta "github.com/openyurtio/openyurt/pkg/yurthub/kubernetes/meta"
"github.com/openyurtio/openyurt/pkg/yurthub/storage"
"github.com/openyurtio/openyurt/pkg/yurthub/util"

"k8s.io/apimachinery/pkg/api/errors"
metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion"
metainternalversionscheme "k8s.io/apimachinery/pkg/apis/meta/internalversion/scheme"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
apirequest "k8s.io/apiserver/pkg/endpoints/request"
"k8s.io/klog"

manager "github.com/openyurtio/openyurt/pkg/yurthub/cachemanager"
hubmeta "github.com/openyurtio/openyurt/pkg/yurthub/kubernetes/meta"
"github.com/openyurtio/openyurt/pkg/yurthub/storage"
"github.com/openyurtio/openyurt/pkg/yurthub/util"
)

const (
Expand Down
12 changes: 6 additions & 6 deletions pkg/yurthub/proxy/local/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ import (
"testing"
"time"

"github.com/openyurtio/openyurt/pkg/yurthub/cachemanager"
hubmeta "github.com/openyurtio/openyurt/pkg/yurthub/kubernetes/meta"
"github.com/openyurtio/openyurt/pkg/yurthub/kubernetes/serializer"
proxyutil "github.com/openyurtio/openyurt/pkg/yurthub/proxy/util"
"github.com/openyurtio/openyurt/pkg/yurthub/storage/disk"

v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand All @@ -40,6 +34,12 @@ import (
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apiserver/pkg/endpoints/filters"
"k8s.io/apiserver/pkg/endpoints/request"

"github.com/openyurtio/openyurt/pkg/yurthub/cachemanager"
hubmeta "github.com/openyurtio/openyurt/pkg/yurthub/kubernetes/meta"
"github.com/openyurtio/openyurt/pkg/yurthub/kubernetes/serializer"
proxyutil "github.com/openyurtio/openyurt/pkg/yurthub/proxy/util"
"github.com/openyurtio/openyurt/pkg/yurthub/storage/disk"
)

var (
Expand Down
10 changes: 5 additions & 5 deletions pkg/yurthub/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ import (
"net/http"
"time"

"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apiserver/pkg/endpoints/filters"
apirequest "k8s.io/apiserver/pkg/endpoints/request"
"k8s.io/apiserver/pkg/server"

"github.com/openyurtio/openyurt/cmd/yurthub/app/config"
"github.com/openyurtio/openyurt/pkg/yurthub/cachemanager"
"github.com/openyurtio/openyurt/pkg/yurthub/certificate/interfaces"
Expand All @@ -30,11 +35,6 @@ import (
"github.com/openyurtio/openyurt/pkg/yurthub/proxy/util"
"github.com/openyurtio/openyurt/pkg/yurthub/transport"
hubutil "github.com/openyurtio/openyurt/pkg/yurthub/util"

"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apiserver/pkg/endpoints/filters"
apirequest "k8s.io/apiserver/pkg/endpoints/request"
"k8s.io/apiserver/pkg/server"
)

type yurtReverseProxy struct {
Expand Down
3 changes: 2 additions & 1 deletion pkg/yurthub/proxy/remote/loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ import (
"net/url"
"sync"

"k8s.io/klog"

"github.com/openyurtio/openyurt/pkg/yurthub/cachemanager"
"github.com/openyurtio/openyurt/pkg/yurthub/certificate/interfaces"
"github.com/openyurtio/openyurt/pkg/yurthub/filter"
"github.com/openyurtio/openyurt/pkg/yurthub/healthchecker"
"github.com/openyurtio/openyurt/pkg/yurthub/transport"
"github.com/openyurtio/openyurt/pkg/yurthub/util"
"k8s.io/klog"
)

type loadBalancerAlgo interface {
Expand Down
8 changes: 4 additions & 4 deletions pkg/yurthub/proxy/remote/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ import (
"net/url"
"strings"

"k8s.io/apimachinery/pkg/runtime/schema"
apirequest "k8s.io/apiserver/pkg/endpoints/request"
"k8s.io/klog"

"github.com/openyurtio/openyurt/pkg/yurthub/cachemanager"
"github.com/openyurtio/openyurt/pkg/yurthub/filter"
"github.com/openyurtio/openyurt/pkg/yurthub/healthchecker"
"github.com/openyurtio/openyurt/pkg/yurthub/transport"
"github.com/openyurtio/openyurt/pkg/yurthub/util"

"k8s.io/apimachinery/pkg/runtime/schema"
apirequest "k8s.io/apiserver/pkg/endpoints/request"
"k8s.io/klog"
)

// RemoteProxy is an reverse proxy for remote server
Expand Down
6 changes: 3 additions & 3 deletions pkg/yurthub/proxy/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ import (
"strings"
"time"

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

"k8s.io/apimachinery/pkg/api/errors"
metainternalversion "k8s.io/apimachinery/pkg/apis/meta/internalversion"
metainternalversionscheme "k8s.io/apimachinery/pkg/apis/meta/internalversion/scheme"
Expand All @@ -33,6 +30,9 @@ import (
"k8s.io/apimachinery/pkg/labels"
apirequest "k8s.io/apiserver/pkg/endpoints/request"
"k8s.io/klog"

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

const (
Expand Down
3 changes: 2 additions & 1 deletion pkg/yurthub/proxy/util/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ import (
"testing"
"time"

"github.com/openyurtio/openyurt/pkg/yurthub/util"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apiserver/pkg/endpoints/filters"
"k8s.io/apiserver/pkg/endpoints/request"

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

func newTestRequestInfoResolver() *request.RequestInfoFactory {
Expand Down
12 changes: 6 additions & 6 deletions pkg/yurthub/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ import (
"net/http"
"time"

"github.com/gorilla/mux"
"github.com/prometheus/client_golang/prometheus/promhttp"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/kubernetes"
"k8s.io/klog"

"github.com/openyurtio/openyurt/cmd/yurthub/app/config"
"github.com/openyurtio/openyurt/pkg/profile"
"github.com/openyurtio/openyurt/pkg/projectinfo"
"github.com/openyurtio/openyurt/pkg/yurthub/certificate"
"github.com/openyurtio/openyurt/pkg/yurthub/certificate/interfaces"
"github.com/openyurtio/openyurt/pkg/yurthub/certificate/server"
"github.com/openyurtio/openyurt/pkg/yurthub/kubernetes/rest"

"github.com/gorilla/mux"
"github.com/prometheus/client_golang/prometheus/promhttp"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/kubernetes"
"k8s.io/klog"
)

// Server is an interface for providing http service for yurthub
Expand Down
3 changes: 2 additions & 1 deletion pkg/yurthub/storage/disk/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ import (
"strings"
"sync"

"github.com/openyurtio/openyurt/pkg/yurthub/storage"
"k8s.io/klog"

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

const (
Expand Down
4 changes: 2 additions & 2 deletions pkg/yurthub/util/connrotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"sync"
"time"

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

"k8s.io/klog"

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

// closableConn is used to remove reference in dialer
Expand Down
8 changes: 4 additions & 4 deletions pkg/yurthub/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ import (
"path/filepath"
"strings"

"github.com/openyurtio/openyurt/pkg/projectinfo"
"github.com/openyurtio/openyurt/pkg/yurthub/kubernetes/serializer"
"github.com/openyurtio/openyurt/pkg/yurthub/metrics"

"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apiserver/pkg/endpoints/handlers/negotiation"
Expand All @@ -40,6 +36,10 @@ import (
clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
certutil "k8s.io/client-go/util/cert"
"k8s.io/klog"

"github.com/openyurtio/openyurt/pkg/projectinfo"
"github.com/openyurtio/openyurt/pkg/yurthub/kubernetes/serializer"
"github.com/openyurtio/openyurt/pkg/yurthub/metrics"
)

// ProxyKeyType represents the key in proxy request context
Expand Down

0 comments on commit ccabd6f

Please sign in to comment.