Skip to content

Commit

Permalink
fix: fix slice init length (#1171)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuishuang authored Oct 8, 2024
1 parent 7789818 commit 0e45179
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 0e45179

Please sign in to comment.