func Union(sets ...Set) Set {
	maxPos := -1
	maxSize := 0
	for i, set := range sets {
		if l := len(set); l > maxSize {
			maxSize = l
			maxPos = i
		}
	}
	if maxSize == 0 {
		return make(Set)
	}
	u := sets[maxPos].Copy()
	for i, set := range sets {
		if i == maxPos {
			continue
		}
		for item := range set {
			u[item] = _keyExists
		}
	}
	return u
}
Union is the merger of multiple sets. It returns a new set with all the
elements present in all the sets that are passed.
package strset
import (
	"fmt"
	"math"
	"sort"
	"strings"
)
type Set map[string]struct{}
var _keyExists = struct{}{}
func New(ts ...string) Set {
	s := make(Set)
	s.Add(ts...)
	return s
}
func FromSlice(items []string) Set {
	return New(items...)
}
func NewWithSize(size int) Set {
	return make(Set, size)
}
func (s Set) Add(items ...string) {
	for _, item := range items {
		s[item] = _keyExists
	}
}
func (s Set) Remove(items ...string) {
	for _, item := range items {
		delete(s, item)
	}
}
func (s Set) GetOne() string {
	for item := range s {
		return item
	}
	return ""
}
func (s Set) GetOne2() (string, bool) {
	for item := range s {
		return item, true
	}
	return "", false
}
func (s Set) Pop() string {
	for item := range s {
		delete(s, item)
		return item
	}
	return ""
}
func (s Set) Pop2() (string, bool) {
	for item := range s {
		delete(s, item)
		return item, true
	}
	return "", false
}
func (s Set) Has(items ...string) bool {
	has := false
	for _, item := range items {
		if _, has = s[item]; !has {
			break
		}
	}
	return has
}
func (s Set) HasWithPrefix(items ...string) bool {
	for _, prefix := range items {
		for k := range s {
			if strings.HasPrefix(prefix, k) {
				return true
			}
		}
	}
	return false
}
func (s Set) HasAny(items ...string) bool {
	has := false
	for _, item := range items {
		if _, has = s[item]; has {
			break
		}
	}
	return has
}
func (s *Set) Clear() {
	*s = make(Set)
}
func (s Set) IsEqual(t Set) bool {
	if len(s) != len(t) {
		return false
	}
	for item := range s {
		if !t.Has(item) {
			return false
		}
	}
	return true
}
func (s Set) IsSubset(t Set) bool {
	if len(s) < len(t) {
		return false
	}
	for item := range t {
		if !s.Has(item) {
			return false
		}
	}
	return true
}
func (s Set) IsSuperset(t Set) bool {
	return t.IsSubset(s)
}
func (s Set) Copy() Set {
	u := make(Set, len(s))
	for item := range s {
		u[item] = _keyExists
	}
	return u
}
func (s Set) String() string {
	v := make([]string, 0, len(s))
	for item := range s {
		v = append(v, fmt.Sprintf("%v", item))
	}
	return fmt.Sprintf("[%s]", strings.Join(v, ", "))
}
func (s Set) Slice() []string {
	v := make([]string, 0, len(s))
	for item := range s {
		v = append(v, item)
	}
	return v
}
func (s Set) SliceSorted() []string {
	v := s.Slice()
	sort.Strings(v)
	return v
}
func (s Set) Merge(sets ...Set) {
	for _, set := range sets {
		for item := range set {
			s[item] = _keyExists
		}
	}
}
func (s Set) Subtract(sets ...Set) {
	for _, set := range sets {
		for item := range set {
			delete(s, item)
		}
	}
}
func (s Set) Shrink(targetLen int) {
	for len(s) > targetLen {
		s.Pop()
	}
}
func (s Set) ShrinkSorted(targetLen int) {
	if len(s) <= targetLen {
		return
	}
	sorted := s.SliceSorted()
	extras := sorted[targetLen:]
	s.Remove(extras...)
}