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

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


The following commit(s) were added to refs/heads/develop by this push:
     new beb51fc40 feat: register client filter to overallReference (#2886)
beb51fc40 is described below

commit beb51fc4079b33e1a44174e93233a28289faf73a
Author: Whitea <[email protected]>
AuthorDate: Thu May 22 09:35:10 2025 +0800

    feat: register client filter to overallReference (#2886)
    
    * feat: register client filter to overallReference
    
    * feat: remove register filter to consumer
    
    * chore: keep todo comment
    
    * test: update client filter test
---
 client/options.go      | 3 +--
 client/options_test.go | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/client/options.go b/client/options.go
index 28610e24e..e2ffba8f3 100644
--- a/client/options.go
+++ b/client/options.go
@@ -546,8 +546,7 @@ func WithClientURL(url string) ClientOption {
 // todo(DMwangnima): change Filter Option like Cluster and LoadBalance
 func WithClientFilter(filter string) ClientOption {
        return func(opts *ClientOptions) {
-               // todo: move this to overallReference
-               opts.Consumer.Filter = filter
+               opts.overallReference.Filter = filter
        }
 }
 
diff --git a/client/options_test.go b/client/options_test.go
index 4983e2d23..8b4ac24f5 100644
--- a/client/options_test.go
+++ b/client/options_test.go
@@ -90,7 +90,7 @@ func TestWithClientFilter(t *testing.T) {
                        },
                        verify: func(t *testing.T, cli *Client, err error) {
                                assert.Nil(t, err)
-                               assert.Equal(t, "test_filter", 
cli.cliOpts.Consumer.Filter)
+                               assert.Equal(t, "test_filter", 
cli.cliOpts.overallReference.Filter)
                        },
                },
        }

Reply via email to