mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-05 00:04:04 +00:00
Update dependencies (#1951)
This commit is contained in:
6
vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
generated
vendored
6
vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
generated
vendored
@ -25,7 +25,7 @@ type entry struct {
|
||||
// NewLRU constructs an LRU of the given size
|
||||
func NewLRU(size int, onEvict EvictCallback) (*LRU, error) {
|
||||
if size <= 0 {
|
||||
return nil, errors.New("Must provide a positive size")
|
||||
return nil, errors.New("must provide a positive size")
|
||||
}
|
||||
c := &LRU{
|
||||
size: size,
|
||||
@ -109,7 +109,7 @@ func (c *LRU) Remove(key interface{}) (present bool) {
|
||||
}
|
||||
|
||||
// RemoveOldest removes the oldest item from the cache.
|
||||
func (c *LRU) RemoveOldest() (key interface{}, value interface{}, ok bool) {
|
||||
func (c *LRU) RemoveOldest() (key, value interface{}, ok bool) {
|
||||
ent := c.evictList.Back()
|
||||
if ent != nil {
|
||||
c.removeElement(ent)
|
||||
@ -120,7 +120,7 @@ func (c *LRU) RemoveOldest() (key interface{}, value interface{}, ok bool) {
|
||||
}
|
||||
|
||||
// GetOldest returns the oldest entry
|
||||
func (c *LRU) GetOldest() (key interface{}, value interface{}, ok bool) {
|
||||
func (c *LRU) GetOldest() (key, value interface{}, ok bool) {
|
||||
ent := c.evictList.Back()
|
||||
if ent != nil {
|
||||
kv := ent.Value.(*entry)
|
||||
|
5
vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go
generated
vendored
5
vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
// Package simplelru provides simple LRU implementation based on build-in container/list.
|
||||
package simplelru
|
||||
|
||||
// LRUCache is the interface for simple LRU cache.
|
||||
@ -34,6 +35,6 @@ type LRUCache interface {
|
||||
// Clears all cache entries.
|
||||
Purge()
|
||||
|
||||
// Resizes cache, returning number evicted
|
||||
Resize(int) int
|
||||
// Resizes cache, returning number evicted
|
||||
Resize(int) int
|
||||
}
|
||||
|
Reference in New Issue
Block a user