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 0e45179  fix: fix slice init length (#1171)
0e45179 is described below

commit 0e45179bfa23167bdfc3366ea9de6d0a66f22915
Author: cui fliter <[email protected]>
AuthorDate: Tue Oct 8 17:14:34 2024 +0800

    fix: fix slice init length (#1171)
---
 internal/trace.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/internal/trace.go b/internal/trace.go
index 344acd6..24e075c 100644
--- a/internal/trace.go
+++ b/internal/trace.go
@@ -419,7 +419,7 @@ func (td *traceDispatcher) batchCommit(ctxs []TraceContext) 
{
 type Keyset map[string]struct{}
 
 func (ks Keyset) slice() []string {
-       slice := make([]string, len(ks))
+       slice := make([]string, 0, len(ks))
        for k, _ := range ks {
                slice = append(slice, k)
        }

Reply via email to