添加清空map方法

This commit is contained in:
lifeiyi
2019-03-22 17:43:08 +08:00
parent 9e75434152
commit bd8e26e471

View File

@@ -15,6 +15,12 @@ func (m *Map) init() {
}
}
func (m *Map) ClearMap() {
m.Lock()
defer m.Unlock()
m.m = make(map[interface{}]interface{})
}
func (m *Map) UnsafeGet(key interface{}) interface{} {
if m.m == nil {
return nil