-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompat.go
37 lines (30 loc) · 1.36 KB
/
compat.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package set
import "github.com/mhuxtable/go-set/genericset"
// compat contains methods for backwards compatibility with old package interfaces.
// Deprecated. Set is a generic set for items of type interface{}. This exists
// for backwards compatibility; new code should use genericset.Set directly.
type Set = genericset.Set
// Deprecated. New returns a new genericset containing the supplied items. This
// exists for backwards compatibility; new code should call genericset.NewSet
// directly.
func New(xs ...interface{}) Set {
return genericset.NewSet(xs...)
}
// Deprecated. Intersect computes the intersection of two sets, returning the
// result in a third set. This exists for backwards compatibility; new code
// should call genericset.IntersectSet directly.
func Intersect(s1, s2 Set) Set {
return genericset.IntersectSet(s1, s2)
}
// Deprecated. Union computes the set union of two sets, returning the result
// in a third set. This exists for backwards compatibility; new code should
// call genericset.UnionSet directly.
func Union(s1, s2 Set) Set {
return genericset.UnionSet(s1, s2)
}
// Deprecated. Subtract computes the subtraction of set s2 from set s1,
// returning the result in a third set. This exists for backwards
// compatibility; new code should call genericset.SubtractSet directly.
func Subtract(s1, s2 Set) Set {
return genericset.SubtractSet(s1, s2)
}