mirror of
https://github.com/prymitive/karma
synced 2026-05-15 04:06:41 +00:00
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
22 lines
457 B
Go
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
|
|
}
|