From d889e39e874bb6dd638f47bf06dbbc30ce3e758e Mon Sep 17 00:00:00 2001 From: LeeGunhee Date: Fri, 2 Jul 2021 08:33:24 +0900 Subject: [PATCH] fix nil point error on lra.Clear() --- scouterx/common/structure/lra/lra.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scouterx/common/structure/lra/lra.go b/scouterx/common/structure/lra/lra.go index 94d02d1..317681d 100644 --- a/scouterx/common/structure/lra/lra.go +++ b/scouterx/common/structure/lra/lra.go @@ -114,8 +114,8 @@ func (c *Cache) Clear() { c.OnEvicted(kv.key, kv.value) } } - c.lst = nil - c.table = nil + c.lst = list.New() + c.table = make(map[interface{}]*list.Element) } func (c *Cache) GetValues() []interface{} {