aboutsummaryrefslogtreecommitdiffstats
path: root/cache
diff options
context:
space:
mode:
Diffstat (limited to 'cache')
-rw-r--r--cache/repo_cache.go16
1 files changed, 4 insertions, 12 deletions
diff --git a/cache/repo_cache.go b/cache/repo_cache.go
index d6e8857d..107a4876 100644
--- a/cache/repo_cache.go
+++ b/cache/repo_cache.go
@@ -172,18 +172,10 @@ func (c *RepoCache) lock() error {
}
func (c *RepoCache) Close() error {
- for id := range c.identities {
- delete(c.identities, id)
- }
- for id := range c.identitiesExcerpts {
- delete(c.identitiesExcerpts, id)
- }
- for id := range c.bugs {
- delete(c.bugs, id)
- }
- for id := range c.bugExcerpts {
- delete(c.bugExcerpts, id)
- }
+ c.identities = make(map[entity.Id]*IdentityCache)
+ c.identitiesExcerpts = nil
+ c.bugs = make(map[entity.Id]*BugCache)
+ c.bugExcerpts = nil
lockPath := repoLockFilePath(c.repo)
return os.Remove(lockPath)