From 7793426379dc64e78da04fc42e2de50e5392d8d6 Mon Sep 17 00:00:00 2001
From: a <a@tuxpa.in>
Date: Tue, 21 Nov 2023 23:15:38 -0600
Subject: [PATCH] delete more code
---
pkg/util/mapset/mapset.go | 36 ------------------------------------
1 file changed, 36 deletions(-)
delete mode 100644 pkg/util/mapset/mapset.go
diff --git a/pkg/util/mapset/mapset.go b/pkg/util/mapset/mapset.go
deleted file mode 100644
index 88a54c1..0000000
--- a/pkg/util/mapset/mapset.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package mapset
-
-import "sync"
-
-type Set[T comparable] struct {
- m map[T]struct{}
- mu sync.RWMutex
-}
-
-func NewSet[T comparable]() *Set[T] {
- return &Set[T]{
- m: make(map[T]struct{}),
- }
-}
-
-func (s *Set[T]) Add(x T) {
- s.mu.Lock()
- defer s.mu.Unlock()
- s.m[x] = struct{}{}
-}
-
-func (s *Set[T]) Remove(x T) {
- s.mu.Lock()
- defer s.mu.Unlock()
- delete(s.m, x)
-}
-
-func (s *Set[T]) Each(fn func(x T) bool) {
- s.mu.RLock()
- defer s.mu.RUnlock()
- for k := range s.m {
- if !fn(k) {
- return
- }
- }
-}
--
GitLab