Linting and staticcheck fixes. (#101)

* Fix linting and staticcheck issues

* Add changelog update

* Remove SetNext
This commit is contained in:
Yulian Kuncheff 2025-03-25 15:02:05 +01:00 committed by GitHub
parent 18cd8a66a2
commit f29a200f09
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 13 additions and 17 deletions

View file

@ -64,7 +64,7 @@ func (m *Impl[K, V]) Get(key K) (V, bool) {
m.lock.Lock()
// Since previously reading m.data[key], the value may have been updated.
// Delete the entry only if the expiry time is still the same.
if m.data[key].expiry == value.expiry {
if m.data[key].expiry.Equal(value.expiry) {
delete(m.data, key)
}
m.lock.Unlock()