1
0
mirror of https://github.com/charlienet/go-mixed.git synced 2025-07-18 08:32:40 +08:00
This commit is contained in:
2022-04-07 15:26:49 +08:00
parent cfa90dff4f
commit 9ff187c944
4 changed files with 58 additions and 0 deletions

View File

@ -15,6 +15,10 @@ func (s Set[T]) Add(values ...T) {
}
}
func (s Set[T]) Remove(v T) {
delete(s, v)
}
func (s Set[T]) Contain(value T) bool {
_, ok := s[value]
return ok