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

Method Union

tools/stringset.go:72–82  ·  view source on GitHub ↗

Returns a new set with all items in both sets.

(other StringSet)

Source from the content-addressed store, hash-verified

70
71// Returns a new set with all items in both sets.
72func (set StringSet) Union(other StringSet) StringSet {
73 unionedSet := NewStringSet()
74
75 for elem := range set {
76 unionedSet.Add(elem)
77 }
78 for elem := range other {
79 unionedSet.Add(elem)
80 }
81 return unionedSet
82}
83
84// Returns a new set with items that exist only in both sets.
85func (set StringSet) Intersect(other StringSet) StringSet {

Callers 4

SymmetricDifferenceMethod · 0.45
TestOrderedSetUnionFunction · 0.45
migrateImportCommandFunction · 0.45
migrateExportCommandFunction · 0.45

Calls 2

AddMethod · 0.95
NewStringSetFunction · 0.85

Tested by 1

TestOrderedSetUnionFunction · 0.36