Skip to content

Commit 7be38c4

Browse files
authored
Fix slice init length (#6293)
Signed-off-by: cuishuang <[email protected]>
1 parent add84ef commit 7be38c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/quotas/limiter_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ func newFixedRpsMultiStageRateLimiter(globalRps float64, domainRps int) Policy {
160160
)
161161
}
162162
func getDomains(n int) []string {
163-
domains := make([]string, n)
163+
domains := make([]string, 0, n)
164164
for i := 0; i < n; i++ {
165165
domains = append(domains, fmt.Sprintf("domains%v", i))
166166
}

0 commit comments

Comments
 (0)