17 lines
271 B
Go
Raw Normal View History

2018-04-19 15:48:15 +00:00
package utils
import "github.com/animenotifier/arn"
// Intersection returns common elements of a and b.
func Intersection(a []string, b []string) []string {
var c []string
for _, obj := range a {
if arn.Contains(b, obj) {
c = append(c, obj)
}
}
return c
}