Skip to content

Commit

Permalink
Merge pull request #1615 from cuishuang/main
Browse files Browse the repository at this point in the history
fix: fix slice init length
  • Loading branch information
sagikazarmark authored Oct 4, 2024
2 parents a53fb09 + da0f931 commit 255204f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openmeter/dedupe/redisdedupe/redisdedupe.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (d Deduplicator) CheckUnique(ctx context.Context, item dedupe.Item) (bool,

// Set sets events into redis
func (d Deduplicator) Set(ctx context.Context, items ...dedupe.Item) error {
keys := make([]string, len(items))
keys := make([]string, 0, len(items))
for _, item := range items {
keys = append(keys, item.Key())
}
Expand Down

0 comments on commit 255204f

Please sign in to comment.