See friends who liked a character
This commit is contained in:
16
utils/Intersection.go
Normal file
16
utils/Intersection.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user