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 1360af3fe style: clean up minor review issues (#3484)
1360af3fe is described below

commit 1360af3fe710e0c5a3a0d8c7e687e9e3c0549e7f
Author: Xin.Zh <[email protected]>
AuthorDate: Mon Jul 13 14:23:07 2026 +0800

    style: clean up minor review issues (#3484)
    
    Avoid scanning the same suffix twice when extracting sub-properties, and 
remove an unnecessary blank statement from the SequenceID concurrency test.
    
    Tested: gofmt -w common/config/environment.go remoting/exchange_test.go; go 
test ./common/config ./remoting -count=1; go vet ./common/config ./remoting; 
git diff --check; wsl bash -lc 'cd /mnt/d/test/github/dubbo-go && go test 
./common/config ./remoting -count=1'
    
    Signed-off-by: Xin.Zh <[email protected]>
    Co-authored-by: OmX <[email protected]>
---
 common/config/environment.go | 4 ++--
 remoting/exchange_test.go    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/config/environment.go b/common/config/environment.go
index a03cea54a..b6655e5a8 100644
--- a/common/config/environment.go
+++ b/common/config/environment.go
@@ -138,8 +138,8 @@ func (conf *InmemoryConfiguration) GetSubProperty(subKey 
string) map[string]stru
        conf.store.Range(func(key, _ any) bool {
                if idx := strings.Index(key.(string), subKey); idx >= 0 {
                        after := key.(string)[idx+len(subKey):]
-                       if found := strings.Contains(after, "."); found {
-                               properties[after[0:strings.Index(after, ".")]] 
= struct{}{}
+                       if idx := strings.Index(after, "."); idx >= 0 {
+                               properties[after[0:idx]] = struct{}{}
                        }
 
                }
diff --git a/remoting/exchange_test.go b/remoting/exchange_test.go
index 73e073a1b..493f9f567 100644
--- a/remoting/exchange_test.go
+++ b/remoting/exchange_test.go
@@ -43,7 +43,7 @@ func TestSequenceIDConcurrent(t *testing.T) {
        var wg sync.WaitGroup
        ids := make(chan int64, 50)
        for range 50 {
-               wg.Go(func() { ; ids <- SequenceID() })
+               wg.Go(func() { ids <- SequenceID() })
        }
        wg.Wait()
        close(ids)

Reply via email to