summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2023-01-28 22:57:53 +0100
committerGitHub <noreply@github.com>2023-01-28 22:57:53 +0100
commit880586bac42817ffcfea5d9f746f503fa29915b8 (patch)
treea89374cba6f88975f12316ec8d1b8aa1d4c6ba79 /vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
parenteac2a8c8dc831f946970d327e2a80b26b0684255 (diff)
downloadmatterbridge-msglm-880586bac42817ffcfea5d9f746f503fa29915b8.tar.gz
matterbridge-msglm-880586bac42817ffcfea5d9f746f503fa29915b8.tar.bz2
matterbridge-msglm-880586bac42817ffcfea5d9f746f503fa29915b8.zip
Update dependencies (#1951)
Diffstat (limited to 'vendor/github.com/hashicorp/golang-lru/simplelru/lru.go')
-rw-r--r--vendor/github.com/hashicorp/golang-lru/simplelru/lru.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
index a86c8539..9233583c 100644
--- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
+++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go
@@ -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)