MCPcopy
hub / github.com/minio/minio-go / Difference

Method Difference

pkg/set/set.go:144–153  ·  view source on GitHub ↗

Difference - returns the difference with given set as new set.

(sset Set[T])

Source from the content-addressed store, hash-verified

142
143// Difference - returns the difference with given set as new set.
144func (set Set[T]) Difference(sset Set[T]) Set[T] {
145 nset := New[T]()
146 for k := range set {
147 if _, ok := sset[k]; !ok {
148 nset.Add(k)
149 }
150 }
151
152 return nset
153}
154
155// Union - returns the union with given set as new set.
156func (set Set[T]) Union(sset Set[T]) Set[T] {

Callers 7

removeObjectActionsFunction · 0.45
removeBucketActionsFunction · 0.45
RemoveMethod · 0.45
TestIntSetDifferenceFunction · 0.45
TestStringSetDifferenceFunction · 0.45
ExampleSet_intSetFunction · 0.45
ExampleSet_customTypeFunction · 0.45

Calls 1

AddMethod · 0.45

Tested by 4

TestIntSetDifferenceFunction · 0.36
TestStringSetDifferenceFunction · 0.36
ExampleSet_intSetFunction · 0.36
ExampleSet_customTypeFunction · 0.36