Skip to content

Commit d889e39

Browse files
author
LeeGunhee
committed
fix nil point error on lra.Clear()
1 parent 2157586 commit d889e39

File tree

1 file changed

+2
-2
lines changed
  • scouterx/common/structure/lra

1 file changed

+2
-2
lines changed

scouterx/common/structure/lra/lra.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ func (c *Cache) Clear() {
114114
c.OnEvicted(kv.key, kv.value)
115115
}
116116
}
117-
c.lst = nil
118-
c.table = nil
117+
c.lst = list.New()
118+
c.table = make(map[interface{}]*list.Element)
119119
}
120120

121121
func (c *Cache) GetValues() []interface{} {

0 commit comments

Comments
 (0)