diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-12-05 19:05:14 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-12-05 19:05:14 +0300 |
commit | 07ac526ac57e71b6cfd6b810709b1255b65dd113 (patch) | |
tree | 14ea757bb01bc330d6609a0837e9fccfce8ab9cb /internal/source/gitlab/cache/memstore.go | |
parent | af3eeb3bf82c49bfe3b0371b5fb8aaf1ad9ff1b2 (diff) |
Improve tests for gitlab source cache
Diffstat (limited to 'internal/source/gitlab/cache/memstore.go')
-rw-r--r-- | internal/source/gitlab/cache/memstore.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/internal/source/gitlab/cache/memstore.go b/internal/source/gitlab/cache/memstore.go index f53f372f..8b22bde0 100644 --- a/internal/source/gitlab/cache/memstore.go +++ b/internal/source/gitlab/cache/memstore.go @@ -39,10 +39,7 @@ func (m *memstore) ReplaceOrCreate(domain string, entry *Entry) *Entry { m.mux.Lock() defer m.mux.Unlock() - if _, exists := m.store.Get(domain); exists { - m.store.Delete(domain) - } - + m.store.Delete(domain) m.store.SetDefault(domain, entry) return entry |