diff options
author | Emily Chen <82122323+fayfaychan@users.noreply.github.com> | 2022-03-31 12:32:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-31 12:32:32 -0400 |
commit | 052120675fac2ace91dc2c01e5f63c3e6ec62f04 (patch) | |
tree | 6124d4f8cf6d023bb84c5218caaad2221820cdf1 | |
parent | c2a62a275fb6bc0aa3bb017a6d8fd642e953997d (diff) | |
download | opencensus-go-052120675fac2ace91dc2c01e5f63c3e6ec62f04.tar.gz |
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.
-rw-r--r-- | trace/lrumap.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/trace/lrumap.go b/trace/lrumap.go index 908c249..80095a5 100644 --- a/trace/lrumap.go +++ b/trace/lrumap.go @@ -44,7 +44,7 @@ func (lm lruMap) len() int { } func (lm lruMap) keys() []interface{} { - keys := make([]interface{}, len(lm.cacheKeys)) + keys := make([]interface{}, 0, len(lm.cacheKeys)) for k := range lm.cacheKeys { keys = append(keys, k) } |