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

Method Intersection

pkg/set/set.go:132–141  ·  view source on GitHub ↗

Intersection - returns the intersection with given set as new set.

(sset Set[T])

Source from the content-addressed store, hash-verified

130
131// Intersection - returns the intersection with given set as new set.
132func (set Set[T]) Intersection(sset Set[T]) Set[T] {
133 nset := New[T]()
134 for k := range set {
135 if _, ok := sset[k]; ok {
136 nset.Add(k)
137 }
138 }
139
140 return nset
141}
142
143// Difference - returns the difference with given set as new set.
144func (set Set[T]) Difference(sset Set[T]) Set[T] {

Callers 11

isValidStatementFunction · 0.45
getInUsePolicyFunction · 0.45
removeBucketActionsFunction · 0.45
removeStatementsFunction · 0.45
appendStatementFunction · 0.45
getBucketPolicyFunction · 0.45
getObjectPolicyFunction · 0.45
TestIntSetIntersectionFunction · 0.45
ExampleSet_intSetFunction · 0.45
ExampleSet_customTypeFunction · 0.45

Calls 1

AddMethod · 0.45

Tested by 4

TestIntSetIntersectionFunction · 0.36
ExampleSet_intSetFunction · 0.36
ExampleSet_customTypeFunction · 0.36