From f2922155de01b734e3e8b3f50be8f263ec13cacd Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Fri, 6 Mar 2026 18:38:44 +0800 Subject: *: Lint --- internal/lru/get.go | 2 ++ internal/lru/peek.go | 2 ++ internal/lru/remove.go | 2 ++ 3 files changed, 6 insertions(+) (limited to 'internal/lru') diff --git a/internal/lru/get.go b/internal/lru/get.go index 92196003..81383945 100644 --- a/internal/lru/get.go +++ b/internal/lru/get.go @@ -1,6 +1,8 @@ package lru // Get returns value for key and marks it most-recently-used. +// +//nolint:ireturn func (cache *Cache[K, V]) Get(key K) (V, bool) { elem, ok := cache.items[key] if !ok { diff --git a/internal/lru/peek.go b/internal/lru/peek.go index 3a308394..8aced931 100644 --- a/internal/lru/peek.go +++ b/internal/lru/peek.go @@ -1,6 +1,8 @@ package lru // Peek returns value for key without changing recency. +// +//nolint:ireturn func (cache *Cache[K, V]) Peek(key K) (V, bool) { elem, ok := cache.items[key] if !ok { diff --git a/internal/lru/remove.go b/internal/lru/remove.go index 79735edf..3b1f2c93 100644 --- a/internal/lru/remove.go +++ b/internal/lru/remove.go @@ -3,6 +3,8 @@ package lru import "container/list" // Remove deletes key from the cache. +// +//nolint:ireturn func (cache *Cache[K, V]) Remove(key K) (V, bool) { elem, ok := cache.items[key] if !ok { -- cgit v1.3.1-10-gc9f91