MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / ComputeSetComplement

Function ComputeSetComplement

pkg/cleanup/complement.go:18–27  ·  view source on GitHub ↗

ComputeSetComplement returns the complement of the first parameter set relative to the second parameter set.

(isSet, localSet map[string]struct{})

Source from the content-addressed store, hash-verified

16
17// ComputeSetComplement returns the complement of the first parameter set relative to the second parameter set.
18func ComputeSetComplement(isSet, localSet map[string]struct{}) (complement map[string]struct{}) {
19 complement = make(map[string]struct{})
20 for ids := range localSet {
21 if _, ok := isSet[ids]; ok {
22 continue
23 }
24 complement[ids] = struct{}{}
25 }
26 return complement
27}

Callers 9

CleanDataMethod · 0.92
CleanDataMethod · 0.92
CleanDataMethod · 0.92
CleanDataMethod · 0.92
CleanDataMethod · 0.92
CleanDataMethod · 0.92
js_db.goFile · 0.92
ns_db.goFile · 0.92
as_db.goFile · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected