summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmily Chen <82122323+fayfaychan@users.noreply.github.com>2022-03-31 12:32:32 -0400
committerGitHub <noreply@github.com>2022-03-31 12:32:32 -0400
commit052120675fac2ace91dc2c01e5f63c3e6ec62f04 (patch)
tree6124d4f8cf6d023bb84c5218caaad2221820cdf1
parentc2a62a275fb6bc0aa3bb017a6d8fd642e953997d (diff)
downloadopencensus-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.go2
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)
}