Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-12-05 19:05:14 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-12-05 19:05:14 +0300
commit07ac526ac57e71b6cfd6b810709b1255b65dd113 (patch)
tree14ea757bb01bc330d6609a0837e9fccfce8ab9cb /internal/source/gitlab/cache/memstore.go
parentaf3eeb3bf82c49bfe3b0371b5fb8aaf1ad9ff1b2 (diff)
Improve tests for gitlab source cache
Diffstat (limited to 'internal/source/gitlab/cache/memstore.go')
-rw-r--r--internal/source/gitlab/cache/memstore.go5
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