Update go dependencies (#4322)

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-07-17 09:21:14 -04:00 committed by GitHub
parent 28cc3bb5e2
commit a54ab3341e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
507 changed files with 50566 additions and 40414 deletions

View file

@ -25,7 +25,7 @@ type Cache struct {
// an item is evicted. Zero means no limit.
MaxEntries int
// OnEvicted optionally specifies a callback function to be
// OnEvicted optionally specificies a callback function to be
// executed when an entry is purged from the cache.
OnEvicted func(key Key, value interface{})
@ -119,15 +119,3 @@ func (c *Cache) Len() int {
}
return c.ll.Len()
}
// Clear purges all stored items from the cache.
func (c *Cache) Clear() {
if c.OnEvicted != nil {
for _, e := range c.cache {
kv := e.Value.(*entry)
c.OnEvicted(kv.key, kv.value)
}
}
c.ll = nil
c.cache = nil
}