You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2021/07/27 14:41:43 UTC

[dubbo-getty] branch master updated: style(*): format all imports with dubbogo/tools/imports-formatter

This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-getty.git


The following commit(s) were added to refs/heads/master by this push:
     new 3ea0e19  style(*): format all imports with dubbogo/tools/imports-formatter
     new 5b7d8d2  Merge pull request #69 from Mulavar/imports-fmt
3ea0e19 is described below

commit 3ea0e197e559b6c806dd123b1ff94b193188569f
Author: Dong Jianhui <97...@qq.com>
AuthorDate: Tue Jul 27 22:00:32 2021 +0800

    style(*): format all imports with dubbogo/tools/imports-formatter
---
 benchmark/client/main.go        | 5 ++++-
 benchmark/loop_client/main.go   | 5 ++++-
 benchmark/server/main.go        | 5 ++++-
 connection.go                   | 2 ++
 demo/hello/tcp/client/client.go | 2 +-
 demo/hello/tcp/config.go        | 3 ---
 demo/hello/tcp/server/server.go | 2 +-
 demo/hello/tls/config.go        | 3 ---
 options.go                      | 8 +++-----
 session.go                      | 1 -
 10 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/benchmark/client/main.go b/benchmark/client/main.go
index 596a19f..7b545f6 100644
--- a/benchmark/client/main.go
+++ b/benchmark/client/main.go
@@ -30,11 +30,14 @@ import (
 )
 
 import (
-	getty "github.com/apache/dubbo-getty"
 	"github.com/dubbogo/gost/sync"
 	"github.com/montanaflynn/stats"
 )
 
+import (
+	getty "github.com/apache/dubbo-getty"
+)
+
 var (
 	concurrency = flag.Int("c", 1, "concurrency")
 	total       = flag.Int("n", 1, "total requests for all clients")
diff --git a/benchmark/loop_client/main.go b/benchmark/loop_client/main.go
index 3ad1698..8f1bd95 100644
--- a/benchmark/loop_client/main.go
+++ b/benchmark/loop_client/main.go
@@ -28,10 +28,13 @@ import (
 )
 
 import (
-	getty "github.com/apache/dubbo-getty"
 	"github.com/dubbogo/gost/sync"
 )
 
+import (
+	getty "github.com/apache/dubbo-getty"
+)
+
 var (
 	concurrency = flag.Int("c", 1, "concurrency")
 	total       = flag.Int("n", 1, "total requests for all clients")
diff --git a/benchmark/server/main.go b/benchmark/server/main.go
index a5655cf..8f59d98 100644
--- a/benchmark/server/main.go
+++ b/benchmark/server/main.go
@@ -33,10 +33,13 @@ import (
 )
 
 import (
-	getty "github.com/apache/dubbo-getty"
 	gxsync "github.com/dubbogo/gost/sync"
 )
 
+import (
+	getty "github.com/apache/dubbo-getty"
+)
+
 var (
 	taskPoolMode = flag.Bool("taskPool", false, "task pool mode")
 	taskPoolSize = flag.Int("task_pool_size", 2000, "task poll size")
diff --git a/connection.go b/connection.go
index 45e15b1..5c4b43b 100644
--- a/connection.go
+++ b/connection.go
@@ -25,7 +25,9 @@ import (
 	"net"
 	"sync"
 	"time"
+)
 
+import (
 	"github.com/golang/snappy"
 	"github.com/gorilla/websocket"
 	perrors "github.com/pkg/errors"
diff --git a/demo/hello/tcp/client/client.go b/demo/hello/tcp/client/client.go
index 9f9d9a0..a9d1051 100644
--- a/demo/hello/tcp/client/client.go
+++ b/demo/hello/tcp/client/client.go
@@ -22,11 +22,11 @@ import (
 )
 
 import (
-	"github.com/apache/dubbo-getty"
 	"github.com/dubbogo/gost/sync"
 )
 
 import (
+	"github.com/apache/dubbo-getty"
 	"github.com/apache/dubbo-getty/demo/hello"
 	"github.com/apache/dubbo-getty/demo/hello/tcp"
 	"github.com/apache/dubbo-getty/demo/util"
diff --git a/demo/hello/tcp/config.go b/demo/hello/tcp/config.go
index af3a0f5..e0d3bef 100644
--- a/demo/hello/tcp/config.go
+++ b/demo/hello/tcp/config.go
@@ -25,9 +25,6 @@ import (
 
 import (
 	"github.com/apache/dubbo-getty"
-)
-
-import (
 	"github.com/apache/dubbo-getty/demo/hello"
 )
 
diff --git a/demo/hello/tcp/server/server.go b/demo/hello/tcp/server/server.go
index a46315d..1fc34e8 100644
--- a/demo/hello/tcp/server/server.go
+++ b/demo/hello/tcp/server/server.go
@@ -22,11 +22,11 @@ import (
 )
 
 import (
-	"github.com/apache/dubbo-getty"
 	gxsync "github.com/dubbogo/gost/sync"
 )
 
 import (
+	"github.com/apache/dubbo-getty"
 	"github.com/apache/dubbo-getty/demo/hello/tcp"
 	"github.com/apache/dubbo-getty/demo/util"
 )
diff --git a/demo/hello/tls/config.go b/demo/hello/tls/config.go
index 2f5e4d0..bdc9a5e 100644
--- a/demo/hello/tls/config.go
+++ b/demo/hello/tls/config.go
@@ -24,9 +24,6 @@ import (
 
 import (
 	"github.com/apache/dubbo-getty"
-)
-
-import (
 	"github.com/apache/dubbo-getty/demo/hello"
 )
 
diff --git a/options.go b/options.go
index e1d870c..ba36e75 100644
--- a/options.go
+++ b/options.go
@@ -17,11 +17,9 @@
 
 package getty
 
-import gxsync "github.com/dubbogo/gost/sync"
-
-/////////////////////////////////////////
-// Server Options
-/////////////////////////////////////////
+import (
+	gxsync "github.com/dubbogo/gost/sync"
+)
 
 type ServerOption func(*ServerOptions)
 
diff --git a/session.go b/session.go
index 7b1549c..e014667 100644
--- a/session.go
+++ b/session.go
@@ -32,7 +32,6 @@ import (
 	gxbytes "github.com/dubbogo/gost/bytes"
 	gxcontext "github.com/dubbogo/gost/context"
 	gxtime "github.com/dubbogo/gost/time"
-
 	"github.com/gorilla/websocket"
 	perrors "github.com/pkg/errors"
 	uatomic "go.uber.org/atomic"