You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by yu...@apache.org on 2022/04/14 15:44:47 UTC

[rocketmq-client-go] branch master updated: [ISSUE #807] fix code style (#808)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 7cd7fa9  [ISSUE #807] fix code style (#808)
7cd7fa9 is described below

commit 7cd7fa94cd86d3be71a41c2f49da67241a9d2a20
Author: zhangyang <Gi...@163.com>
AuthorDate: Thu Apr 14 23:44:41 2022 +0800

    [ISSUE #807] fix code style (#808)
    
    Signed-off-by: zhangyang <Gi...@163.com>
---
 benchmark/consumer.go         |  6 +++---
 benchmark/producer.go         | 14 +++++++-------
 benchmark/stable.go           |  4 ++--
 consumer/strategy_test.go     |  4 ++--
 internal/remote/codec_test.go |  4 ++--
 5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/benchmark/consumer.go b/benchmark/consumer.go
index 907a1e7..a331760 100644
--- a/benchmark/consumer.go
+++ b/benchmark/consumer.go
@@ -91,11 +91,11 @@ func (s *consumeSnapshots) printStati() {
 	s.RUnlock()
 
 	rlog.Info("Benchmark Consumer Snapshot", map[string]interface{}{
-		"consumeTPS": int64(consumeTps),
+		"consumeTPS":     int64(consumeTps),
 		"average(B2C)RT": avgB2CRT,
 		"average(S2C)RT": avgS2CRT,
-		"max(B2C)RT": l.born2ConsumerMaxRT,
-		"max(S2C)RT": l.store2ConsumerMaxRT,
+		"max(B2C)RT":     l.born2ConsumerMaxRT,
+		"max(S2C)RT":     l.store2ConsumerMaxRT,
 	})
 }
 
diff --git a/benchmark/producer.go b/benchmark/producer.go
index 7516352..8125bcf 100644
--- a/benchmark/producer.go
+++ b/benchmark/producer.go
@@ -92,12 +92,12 @@ func (s *produceSnapshots) printStati() {
 	s.RUnlock()
 
 	rlog.Info("Benchmark Producer Snapshot", map[string]interface{}{
-		"sendTps": int64(sendTps),
-		"maxRt": maxRT,
-		"averageRt": avgRT,
-		"sendFailed": l.sendRequestFailedCount,
+		"sendTps":        int64(sendTps),
+		"maxRt":          maxRT,
+		"averageRt":      avgRT,
+		"sendFailed":     l.sendRequestFailedCount,
 		"responseFailed": l.receiveResponseFailedCount,
-		"total": l.receiveResponseSuccessCount,
+		"total":          l.receiveResponseSuccessCount,
 	})
 }
 
@@ -179,8 +179,8 @@ AGAIN:
 		goto AGAIN
 	}
 	rlog.Error("Send Message Error", map[string]interface{}{
-		"topic": topic,
-		"tag": tag,
+		"topic":                  topic,
+		"tag":                    tag,
 		rlog.LogKeyUnderlayError: err.Error(),
 	})
 	goto AGAIN
diff --git a/benchmark/stable.go b/benchmark/stable.go
index 2659bc5..43525b3 100644
--- a/benchmark/stable.go
+++ b/benchmark/stable.go
@@ -128,7 +128,7 @@ func (stp *stableTestProducer) run(args []string) {
 	err := stp.flags.Parse(args)
 	if err != nil {
 		rlog.Info("Parse Args Error", map[string]interface{}{
-			"args": args,
+			"args":                   args,
 			rlog.LogKeyUnderlayError: err.Error(),
 		})
 		stp.usage()
@@ -205,7 +205,7 @@ func (stc *stableTestConsumer) run(args []string) {
 	err := stc.flags.Parse(args)
 	if err != nil {
 		rlog.Error("Parse Args Error", map[string]interface{}{
-			"args": args,
+			"args":                   args,
 			rlog.LogKeyUnderlayError: err.Error(),
 		})
 		stc.usage()
diff --git a/consumer/strategy_test.go b/consumer/strategy_test.go
index d521b4b..c50f403 100644
--- a/consumer/strategy_test.go
+++ b/consumer/strategy_test.go
@@ -477,8 +477,8 @@ func TestAllocateByConsistentHash(t *testing.T) {
 			for _, value := range cases {
 				result := strategy("testGroup", value.currentCid, value.mqAll, value.cidAll)
 				rlog.Info("Result Of AllocateByMachineRoom", map[string]interface{}{
-					"currentCid": value.currentCid,
-					"cidAll": value.cidAll,
+					"currentCid":     value.currentCid,
+					"cidAll":         value.cidAll,
 					"allocateResult": result,
 				})
 			}
diff --git a/internal/remote/codec_test.go b/internal/remote/codec_test.go
index 0717451..60f7869 100644
--- a/internal/remote/codec_test.go
+++ b/internal/remote/codec_test.go
@@ -364,7 +364,7 @@ func TestCommandJsonIter(t *testing.T) {
 	err = json.Unmarshal(cmdData, &cmdResp)
 	assert.Nil(t, err)
 	rlog.Info("Json Decode Success", map[string]interface{}{
-		"cmd": cmdResp,
+		"cmd":      cmdResp,
 		"language": cmdResp.Language,
 	})
 
@@ -372,7 +372,7 @@ func TestCommandJsonIter(t *testing.T) {
 	err = json.Unmarshal(data, &cmdResp2)
 	assert.Nil(t, err)
 	rlog.Info("Json Decode Success", map[string]interface{}{
-		"cmd": cmdResp2,
+		"cmd":      cmdResp2,
 		"language": cmdResp2.Language,
 	})
 }