From dfeb3cfa2b584acfe2534665980d09da39dd41a6 Mon Sep 17 00:00:00 2001 From: Patrick Mylund Nielsen Date: Fri, 17 Feb 2012 00:20:20 +0100 Subject: [PATCH] No reason to use *sync.Mutex --- cache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cache.go b/cache.go index 1506070..e33de24 100644 --- a/cache.go +++ b/cache.go @@ -34,7 +34,7 @@ type Cache struct { type cache struct { DefaultExpiration time.Duration Items map[string]*Item - mu *sync.Mutex + mu sync.Mutex janitor *janitor } @@ -303,7 +303,7 @@ func New(de, ci time.Duration) *Cache { c := &cache{ DefaultExpiration: de, Items: map[string]*Item{}, - mu: &sync.Mutex{}, + mu: sync.Mutex{}, } if ci > 0 { j := &janitor{