crowdsec/cmd/crowdsec-cli/utils.go
Thibault "bui" Koechlin 7fe6741df3
Simulation support (#136)
* support simulation mode
2020-07-16 15:59:09 +02:00

20 lines
268 B
Go

package main
func inSlice(s string, slice []string) bool {
for _, str := range slice {
if s == str {
return true
}
}
return false
}
func indexOf(s string, slice []string) int {
for i, elem := range slice {
if s == elem {
return i
}
}
return -1
}