Browse Source

Chore: format import using goimports (#780)

Loyalsoldier 4 years ago
parent
commit
88e1e25aa9

+ 1 - 0
common/mux/client_test.go

@@ -6,6 +6,7 @@ import (
 	"time"
 
 	"github.com/golang/mock/gomock"
+
 	"github.com/v2fly/v2ray-core/v4/common"
 	"github.com/v2fly/v2ray-core/v4/common/errors"
 	"github.com/v2fly/v2ray-core/v4/common/mux"

+ 1 - 0
infra/conf/gun.go

@@ -2,6 +2,7 @@ package conf
 
 import (
 	"github.com/golang/protobuf/proto"
+
 	"github.com/v2fly/v2ray-core/v4/transport/internet/grpc"
 )
 

+ 1 - 0
infra/conf/loopback.go

@@ -2,6 +2,7 @@ package conf
 
 import (
 	"github.com/golang/protobuf/proto"
+
 	"github.com/v2fly/v2ray-core/v4/proxy/loopback"
 )
 

+ 1 - 0
testing/mocks/dns.go

@@ -9,6 +9,7 @@ import (
 	reflect "reflect"
 
 	gomock "github.com/golang/mock/gomock"
+
 	dns "github.com/v2fly/v2ray-core/v4/features/dns"
 )
 

+ 1 - 0
testing/mocks/log.go

@@ -8,6 +8,7 @@ import (
 	reflect "reflect"
 
 	gomock "github.com/golang/mock/gomock"
+
 	log "github.com/v2fly/v2ray-core/v4/common/log"
 )
 

+ 1 - 0
testing/mocks/mux.go

@@ -8,6 +8,7 @@ import (
 	reflect "reflect"
 
 	gomock "github.com/golang/mock/gomock"
+
 	mux "github.com/v2fly/v2ray-core/v4/common/mux"
 )
 

+ 1 - 0
testing/mocks/outbound.go

@@ -9,6 +9,7 @@ import (
 	reflect "reflect"
 
 	gomock "github.com/golang/mock/gomock"
+
 	outbound "github.com/v2fly/v2ray-core/v4/features/outbound"
 )
 

+ 1 - 0
testing/mocks/proxy.go

@@ -9,6 +9,7 @@ import (
 	reflect "reflect"
 
 	gomock "github.com/golang/mock/gomock"
+
 	net "github.com/v2fly/v2ray-core/v4/common/net"
 	routing "github.com/v2fly/v2ray-core/v4/features/routing"
 	transport "github.com/v2fly/v2ray-core/v4/transport"

+ 1 - 1
transport/internet/dialer.go

@@ -2,10 +2,10 @@ package internet
 
 import (
 	"context"
-	"github.com/v2fly/v2ray-core/v4/transport/internet/tagged"
 
 	"github.com/v2fly/v2ray-core/v4/common/net"
 	"github.com/v2fly/v2ray-core/v4/common/session"
+	"github.com/v2fly/v2ray-core/v4/transport/internet/tagged"
 )
 
 // Dialer is the interface for dialing outbound connections.

+ 5 - 4
transport/internet/grpc/dial.go

@@ -8,16 +8,17 @@ import (
 	"sync"
 	"time"
 
+	"google.golang.org/grpc"
+	"google.golang.org/grpc/backoff"
+	"google.golang.org/grpc/connectivity"
+	"google.golang.org/grpc/credentials"
+
 	"github.com/v2fly/v2ray-core/v4/common"
 	"github.com/v2fly/v2ray-core/v4/common/net"
 	"github.com/v2fly/v2ray-core/v4/common/session"
 	"github.com/v2fly/v2ray-core/v4/transport/internet"
 	"github.com/v2fly/v2ray-core/v4/transport/internet/grpc/encoding"
 	"github.com/v2fly/v2ray-core/v4/transport/internet/tls"
-	"google.golang.org/grpc"
-	"google.golang.org/grpc/backoff"
-	"google.golang.org/grpc/connectivity"
-	"google.golang.org/grpc/credentials"
 )
 
 func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.MemoryStreamConfig) (internet.Connection, error) {

+ 3 - 2
transport/internet/grpc/hub.go

@@ -5,14 +5,15 @@ package grpc
 import (
 	"context"
 
+	"google.golang.org/grpc"
+	"google.golang.org/grpc/credentials"
+
 	"github.com/v2fly/v2ray-core/v4/common"
 	"github.com/v2fly/v2ray-core/v4/common/net"
 	"github.com/v2fly/v2ray-core/v4/common/session"
 	"github.com/v2fly/v2ray-core/v4/transport/internet"
 	"github.com/v2fly/v2ray-core/v4/transport/internet/grpc/encoding"
 	"github.com/v2fly/v2ray-core/v4/transport/internet/tls"
-	"google.golang.org/grpc"
-	"google.golang.org/grpc/credentials"
 )
 
 type Listener struct {

+ 1 - 0
transport/internet/tagged/tagged.go

@@ -2,6 +2,7 @@ package tagged
 
 import (
 	"context"
+
 	"github.com/v2fly/v2ray-core/v4/common/net"
 )
 

+ 1 - 0
transport/internet/tagged/taggedimpl/impl.go

@@ -4,6 +4,7 @@ package taggedimpl
 
 import (
 	"context"
+
 	core "github.com/v2fly/v2ray-core/v4"
 	"github.com/v2fly/v2ray-core/v4/common/net"
 	"github.com/v2fly/v2ray-core/v4/common/session"

+ 1 - 0
v2ray_test.go

@@ -4,6 +4,7 @@ import (
 	"testing"
 
 	"github.com/golang/protobuf/proto"
+
 	. "github.com/v2fly/v2ray-core/v4"
 	"github.com/v2fly/v2ray-core/v4/app/dispatcher"
 	"github.com/v2fly/v2ray-core/v4/app/proxyman"