summaryrefslogtreecommitdiff
path: root/vendor/github.com/ncruces/go-sqlite3/internal/util/set.go
blob: 9cfd5abd18dfb611be84fb2ce133943119b87448 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
package util

type Set[E comparable] map[E]struct{}

func (s Set[E]) Add(v E) {
	s[v] = struct{}{}
}

func (s Set[E]) Contains(v E) bool {
	_, ok := s[v]
	return ok
}