Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit 0521206

Browse files
authored
Passing capacity to make() in place of length. (#1276)
* Passing capacity to make() in place of length. The second argument is length and not capacity.
1 parent c2a62a2 commit 0521206

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

trace/lrumap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (lm lruMap) len() int {
4444
}
4545

4646
func (lm lruMap) keys() []interface{} {
47-
keys := make([]interface{}, len(lm.cacheKeys))
47+
keys := make([]interface{}, 0, len(lm.cacheKeys))
4848
for k := range lm.cacheKeys {
4949
keys = append(keys, k)
5050
}

0 commit comments

Comments
 (0)