mirror of https://github.com/status-im/consul.git
12 lines
184 B
Go
12 lines
184 B
Go
|
package lib
|
||
|
|
||
|
// StrContains checks if a list contains a string
|
||
|
func StrContains(l []string, s string) bool {
|
||
|
for _, v := range l {
|
||
|
if v == s {
|
||
|
return true
|
||
|
}
|
||
|
}
|
||
|
return false
|
||
|
}
|