()
| 25 | var cache *lru.Cache[int, string] |
| 26 | |
| 27 | func init() { |
| 28 | cache, _ = lru.NewWithEvict(2, |
| 29 | func(key int, value string) { |
| 30 | fmt.Printf("Evicted: key=%d value=%s\n", key, value) |
| 31 | }, |
| 32 | ) |
| 33 | } |
| 34 | |
| 35 | func main() { |
| 36 | cache.Add(1, "a") // adds 1 |
nothing calls this directly
no outgoing calls
no test coverage detected