mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-29 05:11:51 +02:00
refactor and fix duplicate notification
This commit is contained in:
@@ -22,6 +22,10 @@ func (set Set[T]) Remove(v T) {
|
||||
set.m.Delete(v)
|
||||
}
|
||||
|
||||
func (set Set[T]) Clear() {
|
||||
set.m.Clear()
|
||||
}
|
||||
|
||||
func (set Set[T]) Contains(v T) bool {
|
||||
_, ok := set.m.Load(v)
|
||||
return ok
|
||||
|
||||
Reference in New Issue
Block a user