rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From huzongt...@apache.org
Subject [rocketmq-client-go] branch native updated: [ISSUE #87] use goimport to fmt import order (#84)
Date Thu, 04 Jul 2019 07:45:47 GMT
This is an automated email from the ASF dual-hosted git repository.

huzongtang pushed a commit to branch native
in repository https://gitbox.apache.org/repos/asf/rocketmq-client-go.git


The following commit(s) were added to refs/heads/native by this push:
     new f306bd6  [ISSUE #87] use goimport to fmt import order  (#84)
f306bd6 is described below

commit f306bd6699bfe5c9a47ac60ddbbdde6a0ce4ee42
Author: xujianhai666 <52450794+xujianhai666@users.noreply.github.com>
AuthorDate: Thu Jul 4 15:45:43 2019 +0800

    [ISSUE #87] use goimport to fmt import order  (#84)
    
    * fix address for issue
    
    * use goimports to fmt import order
---
 api.go                             |  1 +
 examples/consumer/main.go          |  5 +++--
 examples/producer/main.go          |  3 ++-
 internal/consumer/consumer.go      | 13 +++++++------
 internal/consumer/consumer_test.go |  3 ++-
 internal/consumer/offset_store.go  | 11 ++++++-----
 internal/consumer/process_queue.go |  9 +++++----
 internal/consumer/pull_consumer.go |  5 +++--
 internal/consumer/push_consumer.go |  9 +++++----
 internal/kernel/client.go          |  7 ++++---
 internal/kernel/model.go           |  1 +
 internal/kernel/route.go           | 11 ++++++-----
 internal/kernel/validators.go      |  3 ++-
 internal/producer/producer.go      |  9 +++++----
 internal/remote/remote_client.go   |  3 ++-
 primitive/message.go               |  1 +
 primitive/result.go                |  1 +
 utils/ring_buffer_test.go          |  3 ++-
 utils/string_test.go               |  3 ++-
 19 files changed, 60 insertions(+), 41 deletions(-)

diff --git a/api.go b/api.go
index 5043f95..e8abd29 100644
--- a/api.go
+++ b/api.go
@@ -19,6 +19,7 @@ package rocketmq
 
 import (
 	"context"
+
 	"github.com/apache/rocketmq-client-go/primitive"
 )
 
diff --git a/examples/consumer/main.go b/examples/consumer/main.go
index 65b0ba3..f433f73 100644
--- a/examples/consumer/main.go
+++ b/examples/consumer/main.go
@@ -19,10 +19,11 @@ package main
 
 import (
 	"fmt"
-	"github.com/apache/rocketmq-client-go/internal/consumer"
-	"github.com/apache/rocketmq-client-go/primitive"
 	"os"
 	"time"
+
+	"github.com/apache/rocketmq-client-go/internal/consumer"
+	"github.com/apache/rocketmq-client-go/primitive"
 )
 
 func main() {
diff --git a/examples/producer/main.go b/examples/producer/main.go
index c3e338d..b52b266 100644
--- a/examples/producer/main.go
+++ b/examples/producer/main.go
@@ -20,9 +20,10 @@ package main
 import (
 	"context"
 	"fmt"
+	"os"
+
 	"github.com/apache/rocketmq-client-go/internal/producer"
 	"github.com/apache/rocketmq-client-go/primitive"
-	"os"
 )
 
 func main() {
diff --git a/internal/consumer/consumer.go b/internal/consumer/consumer.go
index 08ae664..e9aa1b0 100644
--- a/internal/consumer/consumer.go
+++ b/internal/consumer/consumer.go
@@ -20,18 +20,19 @@ package consumer
 import (
 	"encoding/json"
 	"fmt"
-	"github.com/apache/rocketmq-client-go/internal/kernel"
-	"github.com/apache/rocketmq-client-go/internal/remote"
-	"github.com/apache/rocketmq-client-go/primitive"
-	"github.com/apache/rocketmq-client-go/rlog"
-	"github.com/apache/rocketmq-client-go/utils"
-	"github.com/tidwall/gjson"
 	"sort"
 	"strconv"
 	"strings"
 	"sync"
 	"sync/atomic"
 	"time"
+
+	"github.com/apache/rocketmq-client-go/internal/kernel"
+	"github.com/apache/rocketmq-client-go/internal/remote"
+	"github.com/apache/rocketmq-client-go/primitive"
+	"github.com/apache/rocketmq-client-go/rlog"
+	"github.com/apache/rocketmq-client-go/utils"
+	"github.com/tidwall/gjson"
 )
 
 const (
diff --git a/internal/consumer/consumer_test.go b/internal/consumer/consumer_test.go
index 2eb3f24..e433392 100644
--- a/internal/consumer/consumer_test.go
+++ b/internal/consumer/consumer_test.go
@@ -18,9 +18,10 @@ limitations under the License.
 package consumer
 
 import (
-	"github.com/stretchr/testify/assert"
 	"testing"
 	"time"
+
+	"github.com/stretchr/testify/assert"
 )
 
 func TestParseTimestamp(t *testing.T) {
diff --git a/internal/consumer/offset_store.go b/internal/consumer/offset_store.go
index 702ba0d..1fae7a2 100644
--- a/internal/consumer/offset_store.go
+++ b/internal/consumer/offset_store.go
@@ -20,16 +20,17 @@ package consumer
 import (
 	"encoding/json"
 	"fmt"
-	"github.com/apache/rocketmq-client-go/internal/kernel"
-	"github.com/apache/rocketmq-client-go/internal/remote"
-	"github.com/apache/rocketmq-client-go/primitive"
-	"github.com/apache/rocketmq-client-go/rlog"
-	"github.com/apache/rocketmq-client-go/utils"
 	"os"
 	"path/filepath"
 	"strconv"
 	"sync"
 	"time"
+
+	"github.com/apache/rocketmq-client-go/internal/kernel"
+	"github.com/apache/rocketmq-client-go/internal/remote"
+	"github.com/apache/rocketmq-client-go/primitive"
+	"github.com/apache/rocketmq-client-go/rlog"
+	"github.com/apache/rocketmq-client-go/utils"
 )
 
 type readType int
diff --git a/internal/consumer/process_queue.go b/internal/consumer/process_queue.go
index 2ec865c..b0a1c30 100644
--- a/internal/consumer/process_queue.go
+++ b/internal/consumer/process_queue.go
@@ -18,14 +18,15 @@ limitations under the License.
 package consumer
 
 import (
-	"github.com/apache/rocketmq-client-go/primitive"
-	"github.com/apache/rocketmq-client-go/rlog"
-	"github.com/emirpasic/gods/maps/treemap"
-	"github.com/emirpasic/gods/utils"
 	"strconv"
 	"sync"
 	"sync/atomic"
 	"time"
+
+	"github.com/apache/rocketmq-client-go/primitive"
+	"github.com/apache/rocketmq-client-go/rlog"
+	"github.com/emirpasic/gods/maps/treemap"
+	"github.com/emirpasic/gods/utils"
 )
 
 const (
diff --git a/internal/consumer/pull_consumer.go b/internal/consumer/pull_consumer.go
index 9250771..ead633f 100644
--- a/internal/consumer/pull_consumer.go
+++ b/internal/consumer/pull_consumer.go
@@ -21,10 +21,11 @@ import (
 	"context"
 	"errors"
 	"fmt"
-	"github.com/apache/rocketmq-client-go/internal/kernel"
-	"github.com/apache/rocketmq-client-go/primitive"
 	"strconv"
 	"sync"
+
+	"github.com/apache/rocketmq-client-go/internal/kernel"
+	"github.com/apache/rocketmq-client-go/primitive"
 )
 
 type PullConsumer interface {
diff --git a/internal/consumer/push_consumer.go b/internal/consumer/push_consumer.go
index b3d1e5d..be839bc 100644
--- a/internal/consumer/push_consumer.go
+++ b/internal/consumer/push_consumer.go
@@ -21,14 +21,15 @@ import (
 	"context"
 	"errors"
 	"fmt"
-	"github.com/apache/rocketmq-client-go/internal/kernel"
-	"github.com/apache/rocketmq-client-go/primitive"
-	"github.com/apache/rocketmq-client-go/rlog"
-	"github.com/apache/rocketmq-client-go/utils"
 	"math"
 	"os"
 	"strconv"
 	"time"
+
+	"github.com/apache/rocketmq-client-go/internal/kernel"
+	"github.com/apache/rocketmq-client-go/primitive"
+	"github.com/apache/rocketmq-client-go/rlog"
+	"github.com/apache/rocketmq-client-go/utils"
 )
 
 // In most scenarios, this is the mostly recommended usage to consume messages.
diff --git a/internal/kernel/client.go b/internal/kernel/client.go
index 78de681..4687989 100644
--- a/internal/kernel/client.go
+++ b/internal/kernel/client.go
@@ -22,14 +22,15 @@ import (
 	"context"
 	"errors"
 	"fmt"
-	"github.com/apache/rocketmq-client-go/internal/remote"
-	"github.com/apache/rocketmq-client-go/primitive"
-	"github.com/apache/rocketmq-client-go/rlog"
 	"os"
 	"strconv"
 	"strings"
 	"sync"
 	"time"
+
+	"github.com/apache/rocketmq-client-go/internal/remote"
+	"github.com/apache/rocketmq-client-go/primitive"
+	"github.com/apache/rocketmq-client-go/rlog"
 )
 
 const (
diff --git a/internal/kernel/model.go b/internal/kernel/model.go
index b3ef62e..7ccd26c 100644
--- a/internal/kernel/model.go
+++ b/internal/kernel/model.go
@@ -19,6 +19,7 @@ package kernel
 
 import (
 	"encoding/json"
+
 	"github.com/apache/rocketmq-client-go/rlog"
 )
 
diff --git a/internal/kernel/route.go b/internal/kernel/route.go
index f216c0e..416d7b8 100644
--- a/internal/kernel/route.go
+++ b/internal/kernel/route.go
@@ -20,11 +20,6 @@ package kernel
 import (
 	"encoding/json"
 	"errors"
-	"github.com/apache/rocketmq-client-go/internal/remote"
-	"github.com/apache/rocketmq-client-go/primitive"
-	"github.com/apache/rocketmq-client-go/rlog"
-	"github.com/apache/rocketmq-client-go/utils"
-	"github.com/tidwall/gjson"
 	"math/rand"
 	"os"
 	"sort"
@@ -33,6 +28,12 @@ import (
 	"sync"
 	"sync/atomic"
 	"time"
+
+	"github.com/apache/rocketmq-client-go/internal/remote"
+	"github.com/apache/rocketmq-client-go/primitive"
+	"github.com/apache/rocketmq-client-go/rlog"
+	"github.com/apache/rocketmq-client-go/utils"
+	"github.com/tidwall/gjson"
 )
 
 const (
diff --git a/internal/kernel/validators.go b/internal/kernel/validators.go
index f34bd58..b653a18 100644
--- a/internal/kernel/validators.go
+++ b/internal/kernel/validators.go
@@ -18,8 +18,9 @@ limitations under the License.
 package kernel
 
 import (
-	"github.com/apache/rocketmq-client-go/rlog"
 	"regexp"
+
+	"github.com/apache/rocketmq-client-go/rlog"
 )
 
 const (
diff --git a/internal/producer/producer.go b/internal/producer/producer.go
index 52657ee..91bd389 100644
--- a/internal/producer/producer.go
+++ b/internal/producer/producer.go
@@ -21,15 +21,16 @@ import (
 	"context"
 	"errors"
 	"fmt"
+	"os"
+	"sync"
+	"sync/atomic"
+	"time"
+
 	"github.com/apache/rocketmq-client-go/internal/kernel"
 	"github.com/apache/rocketmq-client-go/internal/remote"
 	"github.com/apache/rocketmq-client-go/primitive"
 	"github.com/apache/rocketmq-client-go/rlog"
 	"github.com/apache/rocketmq-client-go/utils"
-	"os"
-	"sync"
-	"sync/atomic"
-	"time"
 )
 
 type Producer interface {
diff --git a/internal/remote/remote_client.go b/internal/remote/remote_client.go
index 40c10f0..cf71134 100644
--- a/internal/remote/remote_client.go
+++ b/internal/remote/remote_client.go
@@ -21,11 +21,12 @@ import (
 	"bytes"
 	"encoding/binary"
 	"errors"
-	"github.com/apache/rocketmq-client-go/rlog"
 	"io"
 	"net"
 	"sync"
 	"time"
+
+	"github.com/apache/rocketmq-client-go/rlog"
 )
 
 var (
diff --git a/primitive/message.go b/primitive/message.go
index d15c8a3..4f7c398 100644
--- a/primitive/message.go
+++ b/primitive/message.go
@@ -19,6 +19,7 @@ package primitive
 
 import (
 	"fmt"
+
 	"github.com/apache/rocketmq-client-go/utils"
 )
 
diff --git a/primitive/result.go b/primitive/result.go
index 0c1e738..c37358c 100644
--- a/primitive/result.go
+++ b/primitive/result.go
@@ -21,6 +21,7 @@ import (
 	"bytes"
 	"encoding/binary"
 	"fmt"
+
 	"github.com/apache/rocketmq-client-go/utils"
 )
 
diff --git a/utils/ring_buffer_test.go b/utils/ring_buffer_test.go
index af35a69..02a8cc0 100644
--- a/utils/ring_buffer_test.go
+++ b/utils/ring_buffer_test.go
@@ -19,11 +19,12 @@ package utils
 
 import (
 	"fmt"
-	"github.com/stretchr/testify/assert"
 	"strconv"
 	"sync"
 	"testing"
 	"time"
+
+	"github.com/stretchr/testify/assert"
 )
 
 func TestRingRead(t *testing.T) {
diff --git a/utils/string_test.go b/utils/string_test.go
index f6d2fe6..e0a9f70 100644
--- a/utils/string_test.go
+++ b/utils/string_test.go
@@ -1,8 +1,9 @@
 package utils
 
 import (
-	"github.com/stretchr/testify/assert"
 	"testing"
+
+	"github.com/stretchr/testify/assert"
 )
 
 func TestVerifyIP(t *testing.T) {


Mime
View raw message