Is there any efficient way to get intersection of two slices in Go?
I want to avoid nested for loop like solutionslice1 := []string{"foo", "bar","hello"}
slice2 := []string{"foo", "bar"}
intersection(slice1, slice2)
=> ["foo", "bar"]
order of string does not matter