ComputeSetComplement returns the complement of the first parameter set relative to the second parameter set.
(isSet, localSet map[string]struct{})
| 16 | |
| 17 | // ComputeSetComplement returns the complement of the first parameter set relative to the second parameter set. |
| 18 | func 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 | } |