1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-26 03:21:29 +00:00

move httplib from beego to beego/httplib safemap support get all items

This commit is contained in:
astaxie 2013-08-06 16:13:45 +08:00
parent 64ef8ad62b
commit 4ecb9cc30b
3 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,4 @@
package beego package httplib
import ( import (
"bytes" "bytes"

View File

@ -1,4 +1,4 @@
package beego package httplib
import ( import (
"io/ioutil" "io/ioutil"

View File

@ -56,3 +56,9 @@ func (m *BeeMap) Delete(k interface{}) {
defer m.lock.Unlock() defer m.lock.Unlock()
delete(m.bm, k) delete(m.bm, k)
} }
func (m *BeeMap) Items() map[interface{}]interface{} {
m.lock.RLock()
defer m.lock.RUnlock()
return m.bm
}