See friends who liked a character

This commit is contained in:
2018-04-19 17:48:15 +02:00
parent e8062017b5
commit 290c18b8b9
5 changed files with 52 additions and 3 deletions

16
utils/Intersection.go Normal file
View File

@ -0,0 +1,16 @@
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
}