Documentation ¶
Index ¶
- type SyncMap
- func (s *SyncMap[T]) Delete(key any)
- func (s *SyncMap[T]) Filter(filter func(item T) bool) []T
- func (s *SyncMap[T]) List() []T
- func (s *SyncMap[T]) Load(key any) (T, bool)
- func (s *SyncMap[T]) LoadAndDelete(key any) (T, bool)
- func (s *SyncMap[T]) LoadOrStore(key any, value T) (T, bool)
- func (s *SyncMap[T]) Range(f func(key any, value T) bool)
- func (s *SyncMap[T]) Size() int
- func (s *SyncMap[T]) Store(key any, value T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SyncMap ¶
type SyncMap[T any] struct { // contains filtered or unexported fields }
func NewSyncMap ¶
func (*SyncMap[T]) List ¶
func (s *SyncMap[T]) List() []T
List *****************************************************
- @Description: 返回成员列表
- @receiver s
- @return []T *****************************************************
func (*SyncMap[T]) LoadAndDelete ¶
func (*SyncMap[T]) LoadOrStore ¶
Click to show internal directories.
Click to hide internal directories.