v0.0.574 add syncMap.clear()
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 3m37s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 3m37s
This commit is contained in:
@@ -119,6 +119,13 @@ func (s *SyncMap[TKey, TData]) Delete(key TKey) bool {
|
||||
return ok
|
||||
}
|
||||
|
||||
func (s *SyncMap[TKey, TData]) Clear() {
|
||||
s.lock.Lock()
|
||||
defer s.lock.Unlock()
|
||||
|
||||
s.data = make(map[TKey]TData)
|
||||
}
|
||||
|
||||
func (s *SyncMap[TKey, TData]) Contains(key TKey) bool {
|
||||
s.lock.Lock()
|
||||
defer s.lock.Unlock()
|
||||
|
Reference in New Issue
Block a user