package vulnerability

type Set map[string]struct{}

func NewSet() Set {
	return make(Set)
}

func (s Set) Add(v *Vulnerability) {
	s[v.hash()] = struct{}{}
}

func (s Set) Remove(v *Vulnerability) {
	delete(s, v.hash())
}

func (s Set) Contains(v *Vulnerability) bool {
	_, ok := s[v.hash()]
	return ok
}
