MCPcopy
hub / github.com/git-lfs/git-lfs / SymmetricDifference

Method SymmetricDifference

tools/stringset.go:116–120  ·  view source on GitHub ↗

Returns a new set with items in the current set or the other set but not in both.

(other StringSet)

Source from the content-addressed store, hash-verified

114
115// Returns a new set with items in the current set or the other set but not in both.
116func (set StringSet) SymmetricDifference(other StringSet) StringSet {
117 aDiff := set.Difference(other)
118 bDiff := other.Difference(set)
119 return aDiff.Union(bDiff)
120}
121
122// Clears the entire set to be the empty set.
123func (set *StringSet) Clear() {

Callers 1

Calls 2

DifferenceMethod · 0.95
UnionMethod · 0.45

Tested by 1