17 lines
282 B
Go
Raw Normal View History

2018-04-19 15:48:15 +00:00
package utils
2019-06-03 09:32:43 +00:00
import "github.com/animenotifier/notify.moe/arn"
2018-04-19 15:48:15 +00:00
// 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
}