mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: update all k8s packages to 0.27.2
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
07b05616a0
commit
2551a0b05f
14
vendor/k8s.io/apimachinery/pkg/util/sets/set.go
generated
vendored
14
vendor/k8s.io/apimachinery/pkg/util/sets/set.go
generated
vendored
@ -64,6 +64,20 @@ func (s Set[T]) Delete(items ...T) Set[T] {
|
||||
return s
|
||||
}
|
||||
|
||||
// Clear empties the set.
|
||||
// It is preferable to replace the set with a newly constructed set,
|
||||
// but not all callers can do that (when there are other references to the map).
|
||||
// In some cases the set *won't* be fully cleared, e.g. a Set[float32] containing NaN
|
||||
// can't be cleared because NaN can't be removed.
|
||||
// For sets containing items of a type that is reflexive for ==,
|
||||
// this is optimized to a single call to runtime.mapclear().
|
||||
func (s Set[T]) Clear() Set[T] {
|
||||
for key := range s {
|
||||
delete(s, key)
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
// Has returns true if and only if item is contained in the set.
|
||||
func (s Set[T]) Has(item T) bool {
|
||||
_, contained := s[item]
|
||||
|
Reference in New Issue
Block a user