mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 20:36:12 +02:00
parent
87a90583fe
commit
7fe6741df3
13 changed files with 328 additions and 38 deletions
19
cmd/crowdsec-cli/utils.go
Normal file
19
cmd/crowdsec-cli/utils.go
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue