Linting and staticcheck fixes. (#101)
* Fix linting and staticcheck issues * Add changelog update * Remove SetNext
This commit is contained in:
parent
18cd8a66a2
commit
f29a200f09
6 changed files with 13 additions and 17 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue