1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Utilize new set type more.

This commit is contained in:
Sascha L. Teichmann 2023-06-15 14:35:51 +02:00
parent 71a3c3a13b
commit c6d0e9a9e2
2 changed files with 21 additions and 20 deletions

View file

@ -41,3 +41,13 @@ func (s Set[K]) Difference(t Set[K]) Set[K] {
}
return d
}
// ContainsAll returns true if all keys of a given set are in this set.
func (s Set[K]) ContainsAll(t Set[K]) bool {
for k := range t {
if !s.Contains(k) {
return false
}
}
return true
}