Files
karma/internal/slices/slices.go
Łukasz Mierzwa 5d4ae47888 Convert all packages to be internal
Internal packages are supported by Go 1.5+, any package in /internal/ dir is only importable from the same repo. This will cleanup main dir a bit and provide better namespace for unsee subpackages
2017-08-04 16:21:27 -07:00

22 lines
457 B
Go

package slices
// BoolInSlice returns true if given bool is found in a slice of bools
func BoolInSlice(boolArray []bool, value bool) bool {
for _, s := range boolArray {
if s == value {
return true
}
}
return false
}
// StringInSlice returns true if given string is found in a slice of strings
func StringInSlice(stringArray []string, value string) bool {
for _, s := range stringArray {
if s == value {
return true
}
}
return false
}