MCPcopy
hub / github.com/docker/compose / Diff

Method Diff

pkg/utils/set.go:68–76  ·  view source on GitHub ↗
(other Set[T])

Source from the content-addressed store, hash-verified

66}
67
68func (s Set[T]) Diff(other Set[T]) Set[T] {
69 out := make(Set[T])
70 for k := range s {
71 if _, ok := other[k]; !ok {
72 out[k] = struct{}{}
73 }
74 }
75 return out
76}
77
78// Clear removes all elements from the set.
79//

Callers 2

TestSet_DiffFunction · 0.80
runUpFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestSet_DiffFunction · 0.64