mirror of
https://github.com/astaxie/beego.git
synced 2024-11-23 02:50:54 +00:00
move httplib from beego to beego/httplib safemap support get all items
This commit is contained in:
parent
64ef8ad62b
commit
4ecb9cc30b
@ -1,4 +1,4 @@
|
|||||||
package beego
|
package httplib
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
@ -1,4 +1,4 @@
|
|||||||
package beego
|
package httplib
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
@ -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
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user