Skip to content

Commit

Permalink
fix nil point error on lra.Clear()
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeGunhee committed Jul 1, 2021
1 parent 2157586 commit d889e39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scouterx/common/structure/lra/lra.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{} {
Expand Down

0 comments on commit d889e39

Please sign in to comment.