diff options
| author | chrislusf <chris.lu@gmail.com> | 2015-03-10 00:20:31 -0700 |
|---|---|---|
| committer | chrislusf <chris.lu@gmail.com> | 2015-03-10 00:20:34 -0700 |
| commit | b07d81fb088638909ace217f4f2eb7927f094682 (patch) | |
| tree | 3d01c017c05e82a78094fcbc5cf988a6cd6509d1 /go/util/concurrent_read_map.go | |
| parent | b4cb8bfd27687cb1bb95f63bc953d02116d02016 (diff) | |
| download | seaweedfs-b07d81fb088638909ace217f4f2eb7927f094682.tar.xz seaweedfs-b07d81fb088638909ace217f4f2eb7927f094682.zip | |
follow golint suggestions
Diffstat (limited to 'go/util/concurrent_read_map.go')
| -rw-r--r-- | go/util/concurrent_read_map.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/go/util/concurrent_read_map.go b/go/util/concurrent_read_map.go index 880fe54e3..41cce8b82 100644 --- a/go/util/concurrent_read_map.go +++ b/go/util/concurrent_read_map.go @@ -32,8 +32,7 @@ func (m *ConcurrentReadMap) Get(key string, newEntry func() interface{}) interfa if value, ok := m.Items[key]; ok { m.rmutex.RUnlock() return value - } else { - m.rmutex.RUnlock() - return m.initMapEntry(key, newEntry) } + m.rmutex.RUnlock() + return m.initMapEntry(key, newEntry) } |
