setops
is a Go package that provides set operations for slices, including union, intersection, difference, symmetric difference, and complement. It uses generics to support any comparable or ordered type.
- Union: Combine two slices into one with unique elements.
- Intersection: Find common elements between two slices.
- Difference: Get elements in the first slice not in the second.
- Symmetric Difference: Find elements in either slice but not in both.
- Complement: Get elements in the second slice not in the first.
go get github.com:ucraft-com/setops