github.com/windmilleng/wat@v0.0.2-0.20180626175338-9349b638e250/utils/slices/slices.go (about) 1 package slices 2 3 func Contains(arr []string, s string) bool { 4 for _, elem := range arr { 5 if elem == s { 6 return true 7 } 8 } 9 return false 10 } 11 12 // Does arrA contain all elements of arrB? (Ignores order and # of occurences of elems.) 13 func ContainsAllElems(arrA, arrB []string) bool { 14 for _, elemB := range arrB { 15 if !Contains(arrA, elemB) { 16 return false 17 } 18 } 19 return true 20 }