Documentation ¶
Index ¶
- type SafeMap
- func (m *SafeMap) ContainsKey(key interface{}) bool
- func (m *SafeMap) Del(key interface{})
- func (m *SafeMap) Dels(keys ...interface{})
- func (m *SafeMap) Get(key interface{}) (interface{}, bool)
- func (m *SafeMap) GetDel(key interface{}) (interface{}, bool)
- func (m *SafeMap) GetOrSet(key, value interface{}) (interface{}, bool)
- func (m *SafeMap) Range(fn func(k, v interface{}) error) (err error)
- func (m *SafeMap) Set(key, value interface{})
- func (m *SafeMap) Size() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SafeMap ¶
type SafeMap struct {
// contains filtered or unexported fields
}
SafeMap provides a map alternative to avoid memory leak. This implementation is not needed until issue below fixed. https://github.com/golang/go/issues/20135 https://github.com/zeromicro/go-zero/blob/master/core/collection/safemap.go
func (*SafeMap) ContainsKey ¶
func (*SafeMap) Del ¶
func (m *SafeMap) Del(key interface{})
Del deletes the value with the given key from m.
Click to show internal directories.
Click to hide internal directories.