1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 14:00:54 +00:00

utils: fix the safemap Items

This commit is contained in:
astaxie 2014-07-26 23:25:51 +08:00
parent ee9749d640
commit e7fcb824c1

View File

@ -72,5 +72,9 @@ func (m *BeeMap) Delete(k interface{}) {
func (m *BeeMap) Items() map[interface{}]interface{} {
m.lock.RLock()
defer m.lock.RUnlock()
return m.bm
r := make(map[interface{}]interface{})
for k, v := range m.bm {
r[k] = v
}
return r
}