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

jianhaixu 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 3c9ef94  modified typo word Resovler to Resolver
     new faeac3f  Merge pull request #554 from lampnick/master
3c9ef94 is described below

commit 3c9ef94d76bd37139511deb024197035494b8033
Author: Nick <[email protected]>
AuthorDate: Wed Nov 11 10:34:08 2020 +0800

    modified typo word Resovler to Resolver
---
 consumer/option.go                         | 4 ++--
 consumer/push_consumer_test.go             | 2 +-
 docs/Introduction.md                       | 2 +-
 examples/consumer/acl/main.go              | 2 +-
 examples/consumer/broadcast/main.go        | 2 +-
 examples/consumer/delay/main.go            | 2 +-
 examples/consumer/interceptor/main.go      | 2 +-
 examples/consumer/namespace/main.go        | 2 +-
 examples/consumer/orderly/main.go          | 2 +-
 examples/consumer/pull/main.go             | 2 +-
 examples/consumer/retry/concurrent/main.go | 2 +-
 examples/consumer/retry/order/main.go      | 2 +-
 examples/consumer/simple/main.go           | 2 +-
 examples/consumer/strategy/main.go         | 2 +-
 examples/consumer/tag/main.go              | 2 +-
 examples/consumer/trace/main.go            | 2 +-
 examples/producer/acl/main.go              | 2 +-
 examples/producer/async/main.go            | 2 +-
 examples/producer/batch/main.go            | 2 +-
 examples/producer/delay/main.go            | 2 +-
 examples/producer/interceptor/main.go      | 2 +-
 examples/producer/namespace/main.go        | 2 +-
 examples/producer/simple/main.go           | 2 +-
 examples/producer/tag/main.go              | 2 +-
 examples/producer/trace/main.go            | 2 +-
 examples/producer/transaction/main.go      | 2 +-
 producer/option.go                         | 4 ++--
 producer/producer_test.go                  | 8 ++++----
 28 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/consumer/option.go b/consumer/option.go
index 07b4246..330f6c4 100644
--- a/consumer/option.go
+++ b/consumer/option.go
@@ -254,8 +254,8 @@ func WithPullInterval(interval time.Duration) Option {
        }
 }
 
-// WithNsResovler set nameserver resolver to fetch nameserver addr
-func WithNsResovler(resolver primitive.NsResolver) Option {
+// WithNsResolver set nameserver resolver to fetch nameserver addr
+func WithNsResolver(resolver primitive.NsResolver) Option {
        return func(options *consumerOptions) {
                options.Resolver = resolver
        }
diff --git a/consumer/push_consumer_test.go b/consumer/push_consumer_test.go
index 7cb5fca..4789e9b 100644
--- a/consumer/push_consumer_test.go
+++ b/consumer/push_consumer_test.go
@@ -36,7 +36,7 @@ func TestStart(t *testing.T) {
        Convey("test Start method", t, func() {
                c, _ := NewPushConsumer(
                        WithGroupName("testGroup"),
-                       
WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+                       
WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                        WithConsumerModel(BroadCasting),
                )
 
diff --git a/docs/Introduction.md b/docs/Introduction.md
index f5b8e12..dd86c90 100644
--- a/docs/Introduction.md
+++ b/docs/Introduction.md
@@ -30,7 +30,7 @@ Producer interface {
 ```
 p, err := rocketmq.NewProducer(
                producer.WithNameServer(endPoint),
-               
//producer.WithNsResovler(primitive.NewPassthroughResolver(endPoint)),
+               
//producer.WithNsResolver(primitive.NewPassthroughResolver(endPoint)),
                producer.WithRetry(2),
                producer.WithGroupName("GID_xxxxxx"),
        )
diff --git a/examples/consumer/acl/main.go b/examples/consumer/acl/main.go
index a6535fd..96d0dd0 100644
--- a/examples/consumer/acl/main.go
+++ b/examples/consumer/acl/main.go
@@ -31,7 +31,7 @@ import (
 func main() {
        c, err := rocketmq.NewPushConsumer(
                consumer.WithGroupName("testGroup"),
-               
consumer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
consumer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                consumer.WithCredentials(primitive.Credentials{
                        AccessKey: "RocketMQ",
                        SecretKey: "12345678",
diff --git a/examples/consumer/broadcast/main.go 
b/examples/consumer/broadcast/main.go
index 29b0b12..219ab3e 100644
--- a/examples/consumer/broadcast/main.go
+++ b/examples/consumer/broadcast/main.go
@@ -31,7 +31,7 @@ import (
 func main() {
        c, _ := rocketmq.NewPushConsumer(
                consumer.WithGroupName("testGroup"),
-               
consumer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
consumer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                consumer.WithConsumeFromWhere(consumer.ConsumeFromFirstOffset),
                consumer.WithConsumerModel(consumer.BroadCasting),
        )
diff --git a/examples/consumer/delay/main.go b/examples/consumer/delay/main.go
index 8cc5c04..1bbe6ed 100644
--- a/examples/consumer/delay/main.go
+++ b/examples/consumer/delay/main.go
@@ -31,7 +31,7 @@ import (
 func main() {
        c, _ := rocketmq.NewPushConsumer(
                consumer.WithGroupName("testGroup"),
-               
consumer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
consumer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
        )
        err := c.Subscribe("TopicTest", consumer.MessageSelector{}, func(ctx 
context.Context,
                msgs ...*primitive.MessageExt) (consumer.ConsumeResult, error) {
diff --git a/examples/consumer/interceptor/main.go 
b/examples/consumer/interceptor/main.go
index 1036c6a..83f43b0 100644
--- a/examples/consumer/interceptor/main.go
+++ b/examples/consumer/interceptor/main.go
@@ -31,7 +31,7 @@ import (
 func main() {
        c, _ := rocketmq.NewPushConsumer(
                consumer.WithGroupName("testGroup"),
-               
consumer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
consumer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                consumer.WithConsumerModel(consumer.Clustering),
                consumer.WithConsumeFromWhere(consumer.ConsumeFromFirstOffset),
                consumer.WithInterceptor(UserFistInterceptor(), 
UserSecondInterceptor()))
diff --git a/examples/consumer/namespace/main.go 
b/examples/consumer/namespace/main.go
index e1b9dea..d46f210 100644
--- a/examples/consumer/namespace/main.go
+++ b/examples/consumer/namespace/main.go
@@ -31,7 +31,7 @@ import (
 func main() {
        c, err := rocketmq.NewPushConsumer(
                consumer.WithGroupName("testGroup"),
-               
consumer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
consumer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                consumer.WithCredentials(primitive.Credentials{
                        AccessKey: "RocketMQ",
                        SecretKey: "12345678",
diff --git a/examples/consumer/orderly/main.go 
b/examples/consumer/orderly/main.go
index 9e7a810..0f33e5f 100644
--- a/examples/consumer/orderly/main.go
+++ b/examples/consumer/orderly/main.go
@@ -31,7 +31,7 @@ import (
 func main() {
        c, _ := rocketmq.NewPushConsumer(
                consumer.WithGroupName("testGroup"),
-               
consumer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
consumer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                consumer.WithConsumerModel(consumer.Clustering),
                consumer.WithConsumeFromWhere(consumer.ConsumeFromFirstOffset),
                consumer.WithConsumerOrder(true),
diff --git a/examples/consumer/pull/main.go b/examples/consumer/pull/main.go
index d740b15..3d49e7e 100644
--- a/examples/consumer/pull/main.go
+++ b/examples/consumer/pull/main.go
@@ -31,7 +31,7 @@ import (
 func main() {
        c, err := rocketmq.NewPullConsumer(
                consumer.WithGroupName("testGroup"),
-               
consumer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
consumer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
        )
        if err != nil {
                rlog.Fatal(fmt.Sprintf("fail to new pullConsumer: %s", err), 
nil)
diff --git a/examples/consumer/retry/concurrent/main.go 
b/examples/consumer/retry/concurrent/main.go
index 5fcf489..49f16d1 100644
--- a/examples/consumer/retry/concurrent/main.go
+++ b/examples/consumer/retry/concurrent/main.go
@@ -37,7 +37,7 @@ import (
 func main() {
        c, _ := rocketmq.NewPushConsumer(
                consumer.WithGroupName("testGroup"),
-               
consumer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
consumer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                consumer.WithConsumerModel(consumer.Clustering),
        )
 
diff --git a/examples/consumer/retry/order/main.go 
b/examples/consumer/retry/order/main.go
index 4ec05e7..e2d13bf 100644
--- a/examples/consumer/retry/order/main.go
+++ b/examples/consumer/retry/order/main.go
@@ -36,7 +36,7 @@ import (
 func main() {
        c, _ := rocketmq.NewPushConsumer(
                consumer.WithGroupName("testGroup"),
-               
consumer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
consumer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                consumer.WithConsumerModel(consumer.Clustering),
                consumer.WithConsumeFromWhere(consumer.ConsumeFromFirstOffset),
                consumer.WithConsumerOrder(true),
diff --git a/examples/consumer/simple/main.go b/examples/consumer/simple/main.go
index 7d1a0b7..70f35b3 100644
--- a/examples/consumer/simple/main.go
+++ b/examples/consumer/simple/main.go
@@ -31,7 +31,7 @@ import (
 func main() {
        c, _ := rocketmq.NewPushConsumer(
                consumer.WithGroupName("testGroup"),
-               
consumer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
consumer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
        )
        err := c.Subscribe("test", consumer.MessageSelector{}, func(ctx 
context.Context,
                msgs ...*primitive.MessageExt) (consumer.ConsumeResult, error) {
diff --git a/examples/consumer/strategy/main.go 
b/examples/consumer/strategy/main.go
index 502524c..269ce11 100644
--- a/examples/consumer/strategy/main.go
+++ b/examples/consumer/strategy/main.go
@@ -31,7 +31,7 @@ import (
 func main() {
        c, _ := rocketmq.NewPushConsumer(
                consumer.WithGroupName("testGroup"),
-               
consumer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
consumer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                consumer.WithStrategy(consumer.AllocateByAveragely),
        )
        err := c.Subscribe("TopicTest", consumer.MessageSelector{}, func(ctx 
context.Context,
diff --git a/examples/consumer/tag/main.go b/examples/consumer/tag/main.go
index 0532971..ec16f51 100644
--- a/examples/consumer/tag/main.go
+++ b/examples/consumer/tag/main.go
@@ -31,7 +31,7 @@ import (
 func main() {
        c, _ := rocketmq.NewPushConsumer(
                consumer.WithGroupName("testGroup"),
-               
consumer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
consumer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
        )
        selector := consumer.MessageSelector{
                Type:       consumer.TAG,
diff --git a/examples/consumer/trace/main.go b/examples/consumer/trace/main.go
index 4daaa9f..97f22ed 100644
--- a/examples/consumer/trace/main.go
+++ b/examples/consumer/trace/main.go
@@ -37,7 +37,7 @@ func main() {
 
        c, _ := rocketmq.NewPushConsumer(
                consumer.WithGroupName("testGroup"),
-               
consumer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
consumer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                consumer.WithTrace(traceCfg),
        )
        err := c.Subscribe("TopicTest", consumer.MessageSelector{}, func(ctx 
context.Context,
diff --git a/examples/producer/acl/main.go b/examples/producer/acl/main.go
index 38d61dc..96881d3 100644
--- a/examples/producer/acl/main.go
+++ b/examples/producer/acl/main.go
@@ -30,7 +30,7 @@ import (
 
 func main() {
        p, err := rocketmq.NewProducer(
-               
producer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
producer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                producer.WithRetry(2),
                producer.WithCredentials(primitive.Credentials{
                        AccessKey: "RocketMQ",
diff --git a/examples/producer/async/main.go b/examples/producer/async/main.go
index aa73881..2a5182c 100644
--- a/examples/producer/async/main.go
+++ b/examples/producer/async/main.go
@@ -31,7 +31,7 @@ import (
 // Package main implements a async producer to send message.
 func main() {
        p, _ := rocketmq.NewProducer(
-               
producer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
producer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                producer.WithRetry(2),
                producer.WithQueueSelector(producer.NewManualQueueSelector()))
 
diff --git a/examples/producer/batch/main.go b/examples/producer/batch/main.go
index d807daf..dc591a1 100644
--- a/examples/producer/batch/main.go
+++ b/examples/producer/batch/main.go
@@ -30,7 +30,7 @@ import (
 
 func main() {
        p, _ := rocketmq.NewProducer(
-               
producer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
producer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                producer.WithRetry(2),
        )
        err := p.Start()
diff --git a/examples/producer/delay/main.go b/examples/producer/delay/main.go
index 465e97c..aadbb70 100644
--- a/examples/producer/delay/main.go
+++ b/examples/producer/delay/main.go
@@ -29,7 +29,7 @@ import (
 
 func main() {
        p, _ := rocketmq.NewProducer(
-               
producer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
producer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                producer.WithRetry(2),
        )
        err := p.Start()
diff --git a/examples/producer/interceptor/main.go 
b/examples/producer/interceptor/main.go
index 47ea1fb..c40f9a0 100644
--- a/examples/producer/interceptor/main.go
+++ b/examples/producer/interceptor/main.go
@@ -30,7 +30,7 @@ import (
 
 func main() {
        p, _ := rocketmq.NewProducer(
-               
producer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
producer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                producer.WithRetry(2),
                producer.WithInterceptor(UserFirstInterceptor(), 
UserSecondInterceptor()),
        )
diff --git a/examples/producer/namespace/main.go 
b/examples/producer/namespace/main.go
index 524bd32..9124284 100644
--- a/examples/producer/namespace/main.go
+++ b/examples/producer/namespace/main.go
@@ -30,7 +30,7 @@ import (
 
 func main() {
        p, err := rocketmq.NewProducer(
-               
producer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
producer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                producer.WithRetry(2),
                producer.WithCredentials(primitive.Credentials{
                        AccessKey: "RocketMQ",
diff --git a/examples/producer/simple/main.go b/examples/producer/simple/main.go
index 8ac4421..6fd3364 100644
--- a/examples/producer/simple/main.go
+++ b/examples/producer/simple/main.go
@@ -31,7 +31,7 @@ import (
 // Package main implements a simple producer to send message.
 func main() {
        p, _ := rocketmq.NewProducer(
-               
producer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
producer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                producer.WithRetry(2),
        )
        err := p.Start()
diff --git a/examples/producer/tag/main.go b/examples/producer/tag/main.go
index 2bcd51b..7ce8559 100644
--- a/examples/producer/tag/main.go
+++ b/examples/producer/tag/main.go
@@ -29,7 +29,7 @@ import (
 
 func main() {
        p, _ := rocketmq.NewProducer(
-               
producer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
producer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                producer.WithRetry(2),
        )
        err := p.Start()
diff --git a/examples/producer/trace/main.go b/examples/producer/trace/main.go
index e6a25a9..b741704 100644
--- a/examples/producer/trace/main.go
+++ b/examples/producer/trace/main.go
@@ -36,7 +36,7 @@ func main() {
        }
 
        p, _ := rocketmq.NewProducer(
-               
producer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
producer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                producer.WithRetry(2),
                producer.WithTrace(traceCfg))
        err := p.Start()
diff --git a/examples/producer/transaction/main.go 
b/examples/producer/transaction/main.go
index dde39a9..05b6c52 100644
--- a/examples/producer/transaction/main.go
+++ b/examples/producer/transaction/main.go
@@ -79,7 +79,7 @@ func (dl *DemoListener) CheckLocalTransaction(msg 
*primitive.MessageExt) primiti
 func main() {
        p, _ := rocketmq.NewTransactionProducer(
                NewDemoListener(),
-               
producer.WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
producer.WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                producer.WithRetry(1),
        )
        err := p.Start()
diff --git a/producer/option.go b/producer/option.go
index 76e9a31..bacef7b 100644
--- a/producer/option.go
+++ b/producer/option.go
@@ -122,8 +122,8 @@ func WithCreateTopicKey(topic string) Option {
        }
 }
 
-// WithNsResovler set nameserver resolver to fetch nameserver addr
-func WithNsResovler(resolver primitive.NsResolver) Option {
+// WithNsResolver set nameserver resolver to fetch nameserver addr
+func WithNsResolver(resolver primitive.NsResolver) Option {
        return func(options *producerOptions) {
                options.Resolver = resolver
        }
diff --git a/producer/producer_test.go b/producer/producer_test.go
index 508acf8..d1b88c3 100644
--- a/producer/producer_test.go
+++ b/producer/producer_test.go
@@ -35,7 +35,7 @@ const (
 
 func TestShutdown(t *testing.T) {
        p, _ := NewDefaultProducer(
-               
WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                WithRetry(2),
                WithQueueSelector(NewManualQueueSelector()),
        )
@@ -98,7 +98,7 @@ func mockB4Send(p *defaultProducer) {
 
 func TestSync(t *testing.T) {
        p, _ := NewDefaultProducer(
-               
WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                WithRetry(2),
                WithQueueSelector(NewManualQueueSelector()),
        )
@@ -149,7 +149,7 @@ func TestSync(t *testing.T) {
 
 func TestASync(t *testing.T) {
        p, _ := NewDefaultProducer(
-               
WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                WithRetry(2),
                WithQueueSelector(NewManualQueueSelector()),
        )
@@ -211,7 +211,7 @@ func TestASync(t *testing.T) {
 
 func TestOneway(t *testing.T) {
        p, _ := NewDefaultProducer(
-               
WithNsResovler(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
+               
WithNsResolver(primitive.NewPassthroughResolver([]string{"127.0.0.1:9876"})),
                WithRetry(2),
                WithQueueSelector(NewManualQueueSelector()),
        )

Reply via email to