Simulation support (#136)

* support simulation mode
This commit is contained in:
Thibault "bui" Koechlin 2020-07-16 15:59:09 +02:00 committed by GitHub
parent 87a90583fe
commit 7fe6741df3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 328 additions and 38 deletions

19
cmd/crowdsec-cli/utils.go Normal file
View file

@ -0,0 +1,19 @@
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
}