1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 12:30:54 +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 (
"bytes"

View File

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

View File

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