浏览代码

Fix: gci command for formatting code (#1757)

* Fix: gci command for formatting code
* Chore: format code
Loyalsoldier 3 年之前
父节点
当前提交
d9125f91af

+ 0 - 1
app/dns/fakedns/fakedns_test.go

@@ -6,7 +6,6 @@ import (
 	"testing"
 
 	"github.com/stretchr/testify/assert"
-
 	"golang.org/x/sync/errgroup"
 
 	"github.com/v2fly/v2ray-core/v5/common"

+ 1 - 2
functions.go

@@ -4,9 +4,8 @@ import (
 	"bytes"
 	"context"
 
-	"github.com/v2fly/v2ray-core/v5/common/environment/envctx"
-
 	"github.com/v2fly/v2ray-core/v5/common"
+	"github.com/v2fly/v2ray-core/v5/common/environment/envctx"
 	"github.com/v2fly/v2ray-core/v5/common/net"
 	"github.com/v2fly/v2ray-core/v5/features/routing"
 	"github.com/v2fly/v2ray-core/v5/transport/internet/udp"

+ 0 - 2
infra/conf/synthetic/router/router_test.go

@@ -13,8 +13,6 @@ import (
 	"github.com/v2fly/v2ray-core/v5/common/net"
 	"github.com/v2fly/v2ray-core/v5/common/serial"
 	"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/testassist"
-
-	// Geo loaders
 	_ "github.com/v2fly/v2ray-core/v5/infra/conf/geodata/memconservative"
 	_ "github.com/v2fly/v2ray-core/v5/infra/conf/geodata/standard"
 	router2 "github.com/v2fly/v2ray-core/v5/infra/conf/synthetic/router"

+ 0 - 2
infra/conf/v4/v2ray_test.go

@@ -21,8 +21,6 @@ import (
 	"github.com/v2fly/v2ray-core/v5/common/serial"
 	"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/muxcfg"
 	"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/testassist"
-
-	// Geo loaders
 	_ "github.com/v2fly/v2ray-core/v5/infra/conf/geodata/memconservative"
 	_ "github.com/v2fly/v2ray-core/v5/infra/conf/geodata/standard"
 	v4 "github.com/v2fly/v2ray-core/v5/infra/conf/v4"

+ 6 - 2
infra/vformat/main.go

@@ -170,8 +170,12 @@ func main() {
 	}
 
 	goimportsArgs := []string{
-		"-w",
-		"-local", "github.com/v2fly/v2ray-core",
+		"write",
+		"--NoInlineComments",
+		"--NoPrefixComments",
+		"--Section", "Standard",
+		"--Section", "Default",
+		"--Section", "pkgPrefix(github.com/v2fly/v2ray-core)",
 	}
 
 	RunMany(gofmt, gofmtArgs, rawFilesSlice)

+ 0 - 2
main/v2binding/v2binding.go

@@ -12,8 +12,6 @@ import (
 	"github.com/v2fly/v2ray-core/v5/app/router"
 	"github.com/v2fly/v2ray-core/v5/common/net"
 	"github.com/v2fly/v2ray-core/v5/common/serial"
-
-	// Initialization
 	_ "github.com/v2fly/v2ray-core/v5/main/distro/all"
 	"github.com/v2fly/v2ray-core/v5/proxy/blackhole"
 	"github.com/v2fly/v2ray-core/v5/proxy/dokodemo"

+ 2 - 3
proxy/socks/client.go

@@ -4,13 +4,11 @@ import (
 	"context"
 	"time"
 
-	"github.com/v2fly/v2ray-core/v5/common/net/packetaddr"
-	"github.com/v2fly/v2ray-core/v5/transport/internet/udp"
-
 	core "github.com/v2fly/v2ray-core/v5"
 	"github.com/v2fly/v2ray-core/v5/common"
 	"github.com/v2fly/v2ray-core/v5/common/buf"
 	"github.com/v2fly/v2ray-core/v5/common/net"
+	"github.com/v2fly/v2ray-core/v5/common/net/packetaddr"
 	"github.com/v2fly/v2ray-core/v5/common/protocol"
 	"github.com/v2fly/v2ray-core/v5/common/retry"
 	"github.com/v2fly/v2ray-core/v5/common/session"
@@ -20,6 +18,7 @@ import (
 	"github.com/v2fly/v2ray-core/v5/features/policy"
 	"github.com/v2fly/v2ray-core/v5/transport"
 	"github.com/v2fly/v2ray-core/v5/transport/internet"
+	"github.com/v2fly/v2ray-core/v5/transport/internet/udp"
 )
 
 // Client is a Socks5 client.

+ 9 - 9
proxy/vlite/inbound/inbound.go

@@ -7,15 +7,6 @@ import (
 	"strconv"
 	"sync"
 
-	"github.com/v2fly/v2ray-core/v5/common"
-	"github.com/v2fly/v2ray-core/v5/common/environment"
-	"github.com/v2fly/v2ray-core/v5/common/environment/envctx"
-	"github.com/v2fly/v2ray-core/v5/common/net"
-	"github.com/v2fly/v2ray-core/v5/common/session"
-	"github.com/v2fly/v2ray-core/v5/common/signal/done"
-	"github.com/v2fly/v2ray-core/v5/features/routing"
-	"github.com/v2fly/v2ray-core/v5/transport/internet"
-
 	"github.com/mustafaturan/bus"
 	"github.com/xiaokangwang/VLite/interfaces"
 	"github.com/xiaokangwang/VLite/interfaces/ibus"
@@ -26,6 +17,15 @@ import (
 	"github.com/xiaokangwang/VLite/transport/udp/udpuni/udpunis"
 	"github.com/xiaokangwang/VLite/transport/uni/uniserver"
 	"github.com/xiaokangwang/VLite/workers/server"
+
+	"github.com/v2fly/v2ray-core/v5/common"
+	"github.com/v2fly/v2ray-core/v5/common/environment"
+	"github.com/v2fly/v2ray-core/v5/common/environment/envctx"
+	"github.com/v2fly/v2ray-core/v5/common/net"
+	"github.com/v2fly/v2ray-core/v5/common/session"
+	"github.com/v2fly/v2ray-core/v5/common/signal/done"
+	"github.com/v2fly/v2ray-core/v5/features/routing"
+	"github.com/v2fly/v2ray-core/v5/transport/internet"
 )
 
 //go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen

+ 1 - 2
proxy/vlite/outbound/outbound.go

@@ -16,6 +16,7 @@ import (
 	"github.com/xiaokangwang/VLite/transport/udp/udpClient"
 	"github.com/xiaokangwang/VLite/transport/udp/udpuni/udpunic"
 	"github.com/xiaokangwang/VLite/transport/uni/uniclient"
+	client2 "github.com/xiaokangwang/VLite/workers/client"
 
 	"github.com/v2fly/v2ray-core/v5/common"
 	"github.com/v2fly/v2ray-core/v5/common/environment"
@@ -28,8 +29,6 @@ import (
 	"github.com/v2fly/v2ray-core/v5/transport"
 	"github.com/v2fly/v2ray-core/v5/transport/internet"
 	"github.com/v2fly/v2ray-core/v5/transport/internet/udp"
-
-	client2 "github.com/xiaokangwang/VLite/workers/client"
 )
 
 //go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen

+ 0 - 2
transport/internet/headers/http/linkedreadRequest.go

@@ -3,8 +3,6 @@ package http
 import (
 	"bufio"
 	"net/http"
-
-	// required to use go:linkname
 	_ "unsafe"
 )